Package: xmldirector.plonecore
xmldirector.plonecoreNoteThis moduleisa solution for mounting XML databases like eXist-db or
BaseX into Plone through their WebDAV portisa solution for construction Dexterity content-types programmatically
or through-the-web with XML related fields where the content is stored
in BaseX or eXist-dbisan _experimental_ solution for mounting general WebDAV
services into Ploneis nota replacement for the ZODBxmldirector.plonecoreis the technical foundation of the XML-Director
project (www.xml-director.info). The goal of the XML-Director project is
building an enterprise-level XML content management system on top of the CMS
Plone (www.plone.org) with support for XML databases like eXis-db or Base-X.
However the underlaying implementation can also be used to mount arbitrary
backend through WebDAV into Plone.xmldirector.plonecoreintegrates  Plone 4.3 or 5.1 with
eXist-db or Base-X or providing the following features:mounts an arbitary eXist-db or Base-X collection into PloneACE editor integrationZIP export from eXist-db or Base-XZIP import into eXist-db or Base-Xpluggable view mechanism for configuring custom views for XML database
content by filename and view namecreate, rename or delete collections through the webextensible architecture through Plone Dexterity behaviorssupport for XQuery scripts called through the RESTXQ layer of eXist-db
(allows you to call XQuery scripts and return the output format (JSON,
HTML, XML) depending on your application requirements)dedicated per-connector logging facilitysmall and extensibleexperimental support for mounting arbitrary WebDAV service into PloneXMLText- a field for storing XML content in BaseX or eXist-dbXPathField- for retrieving parts of XML content stored within aXMLTextfield through an XPath expression (e.g. for extracting
and displaying metadata from XML content)XMLBinaryandXMLImagefields for storing binary data and images
in BaseX or eXist-db. The functionality is identical with the standard
Dexterity file and image fields (except for the different storage layer)The primary usecase forxmldirector.plonecoreis the integration of XML document
collections into Plone using eXist-db or Base-X as storage layer.xmldirector.plonecoreis
not storage layer for Plone content in the first place although it could be
used in some way for storing primary Plone content (or parts of the content)
inside eXist-db or Base-X. There is no build-in support for mapping metadata as stored in
XML documents to Plone metadata or vice versa. However this could be
implemented easily in application specific code build on top ofxmldirector.plonecore. The design goal ofxmldirector.plonecoreis to provide the basic
functionality for integrating Plone with eXist-db or Base-X without implementing any
further specific application requirements.  Additional functionality can be
added through Dexterity behaviors, supplementary browser views, event lifecycle
subscribers and related technology.RequirementsPlone 4.3 (tested)Plone 5.0 (tested)Plone 5.1 (tested)Supported backends:eXist-db 2.2 and 3.0Base-X >= 8.2OwnCloudAlfrescoMarklogic ServerDropbox (via dropdav.com (Dropbox to WebDAV bridge, paid SaaS) or via xmldirector.dropbox)AWS S3Cloud federation servicesOtixo.comStoragemadeeasy.comexperimental support for the following backends/protocols (don’t
use XML Director with these protocols/backends in production):FTP (working in general, open issues with the connection pool)SFTP (working in general, open issues with the connection pool)NoteYou need to pinfs=0.5.4in your buildout configurationConfigurationGoto the Plone control panel and click on theXML-DirectorCoreconfiglet and
configure the your serviceExistDBhttp://localhost:6080/existdb/webdav/dbusername and password required to access your XML database over WebDAVBaseXhttp://localhost:8984/webdavusername and password required to access your XML database over WebDAVOwncloudhttp://hostname:port/remote.php/webdavusername and password required to access your Owncloud instance over WebDAVAlfrescohttp://hostname:port/webdavusername and password required to access your Alfresco instance over WebDAVDropbox (via dropdav.com SaaS)https://dav.dropdav.comusername and password required of your dropdav.com accountDropbox (via xmldirector.dropbox)dropbox://dropbox.comaccess to Dropbox must be authenticated using OAuth
(see xmldirector.dropbox documentation)SME (storagemadeeasy.com)https://webdaveu.storagemadeeasy.com(EU)https://webdav.storagemadeeasy.com(US)username and password required of your storagemadeeasy.com accountOtixo.comhttps://otixo.comusername and password required of your otixo.com accountLocal filesystemfile:///path/to/some/directoryno support for credentials, the referenced filesystem must be readable (and writable)AWS S3s3://bucketnameenter your AWS access key as username and the AWS secret key as passwordyou need to install thebotomodule (either usingpipor using zc.buildout)FTPftp://hostname/path/to/directoryusername and password that are necessary to access the configured directory path
through FTPSFTPsftp://hostname/path/to/directoryusername and password that are necessary to access the configured directory path
through SFTP. Username and password can be omitted in case the XML Director server (your
Plone instance) has access using SSH keys (without passphrase) to the remote SFTP
service. The handling of username + password vs. SSH authentication using SSH keys is
currently under investigation and might change in a further release.Protocol/ServiceNative support3rd-party SaaS support (e.g. Otixo.com, storagemadeeasy.com)Local filesystemYesNoWebDAVYesYesExistDB 2.2/3.0YesYesBaseX 8.3YesYesAmazon AWS S3YesYesAlfrescoYesYesOwncloudYesYesDropbox(experimental)YesSFTP(experimental)YesFTP(experimental)YesUsing xmldirector.plonecoreThe package provides a new content-typesConnectorthat will include
eXist-db or Base-X into Plone - either from the top-level collection of your eXist-db/Base-X
database or from a subcollection. You can browse and traverse into
subcollections, view single documents or edit text-ish content through the web
(using the build-in ACE editor integration).All connection settings (URL, username and password can be overriden on
the connector level) in order to ignore the Plone site-wide eXist-db
settings).NoteThis module provides a generic integration of arbitrary
WebDAV services like OwnCloud, BaseX (over WebDAV) or even other Plone
serves (exposed through the Plone WebDAV source port) with Plone.
This integration is highly experimental and not the primary purpose
ofxmldirector.plonecore. Use the functionality at your own risk.
In order to use this module together with WebDAV services other than the
XML database eXist-db: you have to set the emulation mode towebdavinside the eXist-db control panel of PloneDexterity fieldsxmldirector.plonecorecomes with the following Dexterity fields that
can be either used programmatically in your own field schema or through-the-web.XMLTextTheXMLTextcan be used to storevalidXML content. The field is rendered
without Plone using the ACE editor. You can perform a client-side XML validation
within the edit mode of a document by clicking on theValidate XMLbutton.
A document with invalid XML content can not be submitted or saved. Invalid XML
will be rejected with an error message through the edit form.XMLXPathTheXMLXPathfield can be used to reference anXMLTextfield in order
to display a part of the XML content using an XPath expression.ExampleAnXMLPathfield with field namemyxmlmight contain the following XML
content:<?xml version="1.0"?>
<doc>
    <metadata>
        <title>This is a text</title>
    </metdata>
    <body>....</body>
</doc>In order to extract and display the <title> text within a dedicated Dexterity field
you can use the following extended expression:field=<fieldname>,xpath=<xpath expression>In this case you would use:field=myxml,xpath=/doc/metadata/title/text()Note that the current syntax is very rigid and does not allow any whitespace
characters expect within the <xpath expression>.XMLBinary, XMLImageSame as file and image field in Plone but with BaseX or eXist-db as
storage layer.LicenseThis package is published under the GNU Public License V2 (GPL 2)Source codeSeehttps://bitbucket.org/onkopedia/xmldirector.plonecoreBugtrackerSeehttps://bitbucket.org/onkopedia/xmldirector.plonecoreTravis-CIAll releases and code changes to XML Director are automatically tested against
various combinations of Plone and backend versions. The current test setup
consists of 14 different combinations against the most common databases and
services. Seehttps://github.com/xml-director/xmldirector.plonecore/blob/master/.travis.ymlfor testing details. A complete test run consists of over 1400 single tests.Seehttps://travis-ci.org/xml-director/xmldirector.plonecoreCreditsThe development ofxmldirector.plonecorewas funded as part of a customer project
by Deutsche Gesellschaft für Hämatologie und medizinische Onkologie (DGHO).AuthorAndreas Jung/ZOPYXHundskapfklinge 33D-72074 Tuebingen, Germanyinfo@zopyx.comwww.zopyx.comChangelog2.1.1 (2017-07-23)fixed JS issue in rename action2.1.0 (2017-04-04)compatibility with Plone 5.12.0.4 (2017-01-10)pinned fs==0.5.42.0.3 (2016-12-05)minor bug fixes2.0.2 (2016-08-26)added explicit setContext() to BaseWrapper class for setting a custom
connector class2.0.0 (2016-08-18)full compatibility with Plone 5.0 (limited to Plone 5.1 alpha)replaced DataTables.net with agGridmajor UI changesupdated to latest ACE versionswitch to Dropzone.js for multi-file uploads1.6.1 (2016-04-08)improved unicode filename handling across driversPEP8 fixes1.6.0 (2016-03-18)experimental native Dropbox support (requires installed ‘dropbox’ SDK for
Python using ‘pip install dropbox’ or by adding ‘dropbox’ as dependency
inside your buildout) - not ready for productionworkaround for sporadic open() failures with Exist-DB:
open() will be tried up to three times (with a slight delay between
calls in order to give the backend a chance to recover in between)support for latest plone.api releases (which minor monkey patch)move restapi permission checks to ZCML configurationupdated to ACE 1.2.3updated to DataTables 1.10.11support for latest plone.api release1.5.0 (2016-02-17)huge internal renaming: renamed all webdav_* variables
to connector_*adjusted tests to Marc Logic Server1.4.2 (2016-02-02)fix in restapi in the context of local fs tests1.4.1 (2016-01-18)pass query string down to redirection call within __call__()1.4.0 (2016-01-11)new REST API1.3.0 (2015-12-20)added ‘create_if_not_existing’ parameter to webdav_handle() methodadded ensuredir() to wrapper base class1.3.0b1 (2015-10-15)support for OSFS (local filesystem), S3individual per-connector URL configurationsupport for multi-file uploadsunicode fixes in the context of testing federated cloud solutionsmassive amount of smaller internal and UI fixeslots of testing with different storage backendsupdated tests1.2.0 (2015-09-29)refactored zip export functionalitynew supported WebDAV storage backends:AlfrescoOwncloudDropbox (via dropdav.com SaaS)1.1.1 (2015-08-25)updated selenium version pinbetter encapsulation of the DataTables Javascript initialization
code in local.jsfixed integration bug in Plone 5.01.1.0 (2015-08-21)some CSS styles fine-tuningadded optionaldirsparameter to ZIP export API for
exporting only a subset of the export directory structureadded control panel functionality for installing Exist-DB
specific RESTXQ script (e.g. all-locks.xql which is needed
by the lockmanager introspection control panel for getting
hold of all locks).ZIP import now works inside the given subdirectory and no longer
only on the top level directory of the connectordelete actions for collections and collection itemsdelete actions now ask for confirmationmassive speedup of ZIP import by reducing and caching WebDAV operationsusing Datatables.net for collections and collection itemsZIP export/import is now more robust with directories or filenames
containing non-ascii charactersimproved Plone 5.0 integration1.0.4 (2015-07-22)updated ACeditor to version 1.2.01.0.3 (2015-07-22)using DataTables.net for connector logging view instead of TableUtils JS1.0.2 (2015-06-12)updated Saxon 6.0.6HEadded get_last_user(), get_last_date() to logger API for
getting hold of the username performing the last logger entry1.0.0 (2015-05-30)using defusedxml module for protecting XML Director against
malicious data and XML related security attacksadded support for ‘force_default_view’ URL parameter
to enforce redirection to the default anonymous viewsupport for logging HTML messages0.4.2 (2015-04-11)updated lxml, cssselect dependencies to newest versionsanalyzed XSD parsing slowness and logging/warning long-running
XSD parsingfirst serious take on Plone 5.0 compatibility on the UI level
(backend tests have been always passing but we had serious
UI issues until 5.0 beta 1 and there are still issues). Plone 5
beta support is work-in-progress and not fully completed.0.4.1 (2015-04-07)added entry_by_uuid() to PersistentLogAdapter APIfixed unicode issues with uploaded binaries/images with non-ascii
filenamesadded ‘version_suffix’ parameter to parser_folder() of validator registryJavascript cleanup0.4.0 (2015-02-18)added @@transformer-registery viewadded @@transformer-registery-view viewupdated xmldirector.demo to use Transformer registryadded (optional) debug option for debugging Transformer steps (input and
output data of a step is written to disk)added more testssupport for XSLT2+3 transformations by integrating Saxon 9.6 HE0.3.6 (2015-02-06)re-added Dexterity testsadded validator registry for XML schemas, DTDs, Schematron files
and RelaxNG schemasadded @@validator-registry viewadded unified validation API based on registered validation filesdocumented validator registry0.3.5 (2015-01-30)rewritten persistent logger internals: now uses an OOBTree
for holding all logging entries instead of a persistent list
in order to support filtering of log entries by min-max
valueslogger table now uses a paginated view with searchable columnswebdav password setting is no longer required (empty password allowed)fixed Webdav authentication issue with empty passwordsmoved demo related code into a dedicated package xmldirector.demo0.3.4 (2015-01-13)default view handler accept a custom request/filename
argument in order to override the name of downloaded filefixed bug in view registry with BrowserView as view handleradded PersistentLoggerAdapter for adopting arbitrary
persistent objects for persistent logging through a Zope
annotation0.3.3 (2015-01-05)running the tests should not leave any testing directory
traces within the XML databasesalmost 100% test coverage for the core functionalitymore testsadded documentation on content-types0.3.2 (2014-12-30)SHA256 calculation for xml content now generated in
a more stable way (but possibly much slower way)API for service-side XML validationadded Docker supportadded XSLT registryadded Shakespeare XML data for XMLDocument demo content-typeadded ‘test_all.sh’ script for running tests against BaseX
and eXist-db Docker containers0.3.1 (2014-12-12)addedTest connectionbutton to controlpanelmoved test content type into a dedicated profiledemocontentMoved metadata handling from JSON to XML on the storage
layer in order to let the underlaying database index
the .metadata.xml files as well0.3.0 (2014-12-11)renamed zopyx.existdb to xmldirector.plonecoreexperimental Dexterity support with four new fields:XMLText - for XML contentXMLXPath - for referencing XMLText parts through an XPath
expressionXMLImage and XMLBinary - same as image and file fields in Dexterity
but with eXist-db as storage layerremovedemulationconfiguration optionadded plone.app.dexterity as dependencyupgraded to ACE editor V 1.1.8added progressbar for zip_upload()added support for importing a single file through the
ZIP import form into the current subdirectory0.2.11 (2014-11-08)updated documentation0.2.10 (2014-11-08)bugfix release0.2.9 (2014-11-01)support for overriding credentials locally0.2.8 (2014-11-01)minor fix for mounting Plone sites over WebDAV into another Plone site0.2.7 (2014-11-01)experimental support for BaseX XML database through the WebDAV API.
Limitations: REMOVE operations over WebDAV do not seem to work
against BaseX 7.90.2.6 (2014-11-01)more tests0.2.5 (2014-10-30)experimental traversal support for accessing WebDAV resources by path
using (un)restrictedTraverse()minor URL fixesmore tests0.2.4 (2014-10-22)configuration option for default view for authenticated site visitors0.2.3 (2014-10-13)fix in saving ACE editor content0.2.2 (2014-10-12)typo in page template0.2.1 (2014-10-12)added support for renaming a collection through the web0.2.0 (2014-10-02)various minor bug fixesadded basic tests0.1.17 (2014-09-25)fixed action links0.1.16 (2014-09-25)Connector is no longer a folderish object0.1.15 (2014-09-22)removed indexing support completely (leaving a specific
indexing functionality to policy packages using zopyx.existdb)0.1.14 (2014-09-15)fixed subpath handling in create/remove collections0.1.13 (2014-09-07)support for removing collections TTW0.1.12 (2014-09-05)support for creating new collections TTW0.1.11 (2014-08-21)action “Clear log” added0.1.10 (2014-08-05)log() got a new ‘details’ parameter for adding extensive logging information0.1.9 (2014-08-01)human readable timestamps0.1.8 (2014-07-31)minor visual changes0.1.7 (2014-07-29)rewritten code exist-db browser code (dealing the correct
way with paths, filenames etc.)0.1.6 (2014-07-29)fixed improper view prefix in directory browser0.1.5 (2014-07-13)minor fixes and cleanup0.1.4 (2014-07-12)made webservice query API aware of all output formats (xml, html, json)timezone handling: using environment variable TZ for converting eXist-db UTC
timestamps to the TZ timezone (or UTC as default) for display purposes with
Plone0.1.3 (2014-07-07)added webservice API interfacevarious bug fixes0.1.2 (2014-06-30)various bug fixes0.1.0 (2014-06-20)initial release