<feed xmlns="http://www.w3.org/2005/Atom">
    <id>urn:uuid:4f90385a-5ddb-42b5-9c1d-fdec89ab4c5e</id>
    <atom:entry xmlns:atom="http://www.w3.org/2005/Atom">
        <atom:id>urn:uuid:7c5acda8-1124-44ef-9dd5-e561ff045443</atom:id>
        <wiki:id xmlns:wiki="http://exist-db.org/xquery/wiki">SecureWithHttps</wiki:id>
        <wiki:editor xmlns:wiki="http://exist-db.org/xquery/wiki">wiki</wiki:editor>
        <wiki:is-index xmlns:wiki="http://exist-db.org/xquery/wiki">false</wiki:is-index>
        <atom:published>2011-09-24T17:05:17+02:00</atom:published>
        <atom:updated>2012-04-09T22:49:30.224+02:00</atom:updated>
        <atom:author>
            <atom:name>dizzzz</atom:name>
        </atom:author>
        <atom:title>Secure access with HTTPS</atom:title>
        <atom:summary type="xhtml">
            <article xmlns="http://www.w3.org/1999/xhtml">
                <p>eXist-db can be accessed via the network via (insecure) HTTP and (secure) HTTPS(see here for   <a href="/HowTo/JettySSL">SSL configuration</a>  ). In release 1.4 HTTPS can simply be enabled by changing a configuration file, while in 1.5/trunk HTTPS is out of the box available via port 8443 (the default HTTP port is 8080).Till until recently the HTTPS port could only easily be used with a webbrowser; starting today (1.5 rev15412 and beyond) it is also usable by the eXist-db Java client and the XMLDB + XMLRPC interfaces.</p>
            </article>
        </atom:summary>
        <atom:content type="xhtml">
            <article xmlns="http://www.w3.org/1999/xhtml">
                <section>
                    <section>
                        <h2>Java Client</h2>
                        <p>Connecting via HTTPS using the Java client is easy; start the client (using the client.sh or client.bat scripts, or via the WebStart button), the following window appears:</p>
                        <img src="client.png"/>
                        <p>Select <span class="strong">Type="Remote"</span>, click the <span class="strong">SSL</span> checkbox and verify the <span class="strong">URL</span>: it might change from 8080 (HTTP) to 8443 (HTTPS). The URL must start with . Enter your <span class="strong">username</span> and <span class="strong">password</span>, and click <span class="strong">OK</span>. Now the client connects to the server :</p>
                        <img src="client-connected.png"/>
                        <p>In the statusbar of the window the connection URL is visible. In this example the client is connected to the HTTPS port <span class="strong">8443</span>.</p>
                        <section>
                            <h2>XMLDB</h2>
                            <p>For XMLDB only two steps must be made:</p>
                            <ol>
                                <li>Change the URL to contain the HTTPS port (here: 8443)</li>
                                <li>Set the database property "ssl-enable" to <span class="strong">true</span>
                                </li>
                            </ol>
                            <p>A working example:</p>
                            <div class="ext:code?lang=java">
import javax.xml.transform.OutputKeys;
import org.exist.storage.serializers.EXistOutputKeys;
import org.exist.xmldb.EXistResource;
import org.xmldb.api.DatabaseManager;
import org.xmldb.api.base.Collection;
import org.xmldb.api.base.Database;
import org.xmldb.api.modules.XMLResource;

String collection = "xmldb:exist://localhost:8443/exist/xmlrpc/db";
String document = "document.xml";

// Initialize database driver
Class&lt;?&gt; cl = Class.forName("org.exist.xmldb.DatabaseImpl");
Database database = (Database) cl.newInstance();

// Switch-on SSL for the driver
database.setProperty("ssl-enable", "true");

// Register database
DatabaseManager.registerDatabase(database);


// Get reference to the collection
Collection col = DatabaseManager.getCollection(collection);
col.setProperty(OutputKeys.INDENT, "yes");
col.setProperty(EXistOutputKeys.EXPAND_XINCLUDES, "no");
col.setProperty(EXistOutputKeys.PROCESS_XSL_PI, "yes");

XMLResource res = (XMLResource) col.getResource(document);

if (res == null) {
    System.out.println("document not found!");
} else {
    System.out.println(res.getContent());
}
</div>
                            <section>
                                <h2>XMLRPC</h2>
                                <p>Connecting with XMLRPC has always been possible, but a trick is required to make Java accept self-signed SSL certificates. The XMLRPC project      <a href="https://ws.apache.org/xmlrpc/ssl.html">wrote an article</a>      how to do this.</p>
                                <p>As a concenience the class org.exist.util.SSLHelper has been created to do this trick for you. The following example shows how to retrieve a document:</p>
                                <div class="ext:code?lang=java">
import java.util.Vector;
import java.util.HashMap;
import java.net.URL;
import org.apache.xmlrpc.client.XmlRpcClient;
import org.apache.xmlrpc.client.XmlRpcClientConfigImpl;
import org.exist.util.SSLHelper;

String uri = "https://localhost:8443/exist/xmlrpc";
String documentPath = "/db/document.xml";

// Initialize HTTPS connection to accept selfsigned certificates
// and the Hostname is not validated 
SSLHelper.initialize();

// Setup XMLRPC
XmlRpcClient client = new XmlRpcClient();
XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
config.setServerURL(new URL(uri));
config.setBasicUserName("guest");
config.setBasicPassword("guest");
client.setConfig(config);

// Setup options
HashMap&lt;String, String&gt; options = new HashMap&lt;String, String&gt;();
options.put("indent", "yes");
options.put("encoding", "UTF-8");
options.put("expand-xincludes", "yes");
options.put("process-xsl-pi", "no");

// Setup request parameters
Vector&lt;Object&gt; params = new Vector&lt;Object&gt;();
params.addElement( documentPath ); 
params.addElement( options );

// Execute
String xml = (String)
    client.execute( "getDocumentAsString", params );

System.out.println( xml );
</div>
                                <section>
                                    <h2>Client command line</h2>
                                    <p>When the client is started as <code>client.sh -s</code> it reads the file <code>client.properties</code>. Uncomment the following lines to enable the SSL secured connection :</p>
                                    <div class="ext:code">
## Secure XMLRPC (HTTPS)
#uri=xmldb:exist://localhost:8443/exist/xmlrpc
#ssl-enable=true  
</div>
                                    <section>
                                        <h2>Java stack traces</h2>
                                        <p>Connecting to a HTTPS server is complicated, errors can appear. A typical message is show below. The message means that a client tries to connect with SSL to the server, but the server (on a specific URL) is not SSL enabled.</p>
                                        <ul>
                                            <li>org.xmldb.api.base.XMLDBException: Failed to read server's response: Unrecognized SSL message, plaintext connection?</li>
                                            <li>org.apache.xmlrpc.XmlRpcException: Failed to read server's response: Unrecognized SSL message, plaintext connection?</li>
                                            <li>javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection</li>
                                        </ul>
                                    </section>
                                </section>
                            </section>
                        </section>
                    </section>
                </section>
            </article>
        </atom:content>
        <atom:link type="blog" href="/db/apps/wiki/data/blogs/dizzzz"/>
    </atom:entry>
    <entry>
        <id>urn:uuid:6b8ec456-074f-4448-941b-631fca4185ca</id>
        <updated>2011-09-24T17:00:45+02:00</updated>
        <published>2011-06-22T20:25:08+02:00</published>
        <link href="?id=urn:uuid:6b8ec456-074f-4448-941b-631fca4185ca" rel="edit" type="application/atom+xml"/>
        <title type="text">JFreeChart</title>
        <wiki:id xmlns:wiki="http://exist-db.org/xquery/wiki">JFreeChart</wiki:id>
        <author>
            <name>dizzzz</name>
        </author>
        <atom:content xmlns:atom="http://www.w3.org/2005/Atom" type="xhtml">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>Some time ago two interesting articles have been posted about creating <a href="/blogs/eXist/XQueryDashboards">dashboards</a> in XQuery. One of the articles makes use of the Google Chart API to render graphs and inspired me to add a charting facility to eXist-db using the <a href="http://www.jfree.org/jfreechart/">JFreeChart</a> library.</p>
                <img src="sbc3d.png"/>
                <p>
                    <em>this article is a reconstruction of an article <a href="http://web.archive.org/web/20090424061937/http://atomic.exist-db.org/blogs/dizzzz/JFreeChart">originally written on 14 april 2009</a>
                    </em>
                </p>
                <h1>JFreeChart</h1>
                <h2>Getting Started</h2>
                <p>The new module is made available as an extension module and is not built by default. To enable the extension perform the following steps:</p>
                <ul>
                    <li>Edit <code>extensions/build.properties</code> and follow the instructions</li>
                    <li>Change <code>include.module.jfreechart = false</code> to true</li>
                    <li>Change <code>include.module.fop = false</code> to true for SVG support (new)</li>
                    <li>Uncomment the module in <code>conf.xml</code> (conf.xml.tmpl)</li>
                    <li>Run <code>build.sh</code>
                    </li>
                </ul>
                <p>All required files are downloaded as the module is built. After the build completes the new module's functions are available for use.</p>
                <h2>How to use</h2>
                <p>The module provides two functions:</p>
                <div class="ext:code?lang=xquery">jfreechart:render($a as xs:string, $b as node(), $c as node()) xs:base64Binary?</div>
                <p>This function renders the image into a base64 encoded blob, while -</p>
                <div class="ext:code?lang=xquery">jfreechart:stream-render($a as xs:string, $b as node(), $c as node()) empty()</div>
                <p>renders the image directly to the HTTP response (via. the servlet output stream). This function can only be used in the REST interface.</p>
                <p>Both functions accept the same set of parameters: a is the <span class="strong">chart type</span>, b are the <span class="strong">chart settings</span> and c is the <span class="strong">chart data</span>.</p>
                <h3>a : chart type</h3>
                <p>Not all JFreeChart types are available (yet). At present the following charts are available:</p>
                <p>
                    <em>LineChart, LineChart3D, MultiplePieChart, MultiplePieChart3D, PieChart, PieChart3D, RingChart, StackedAreaChart, StackedBarChart, StackedBarChart3D, WaterfallChart</em>.</p>
                <h3>b : chart settings</h3>
                <p>Parameters are passed as a node, with the element names reflecting the parameters of the original <a href="http://www.jfree.org/jfreechart/api/javadoc/org/jfree/chart/ChartFactory.html">JFreeChart classes</a>:</p>
                <table>
                    <tr>
                        <th>
                            <span class="strong">Parameter</span>
                        </th>
                        <th>
                            <span class="strong">Description</span>
                        </th>
                        <th> </th>
                    </tr>
                    <tr>
                        <th> categoryAxisColor </th>
                        <th> the color of the category axis (#) </th>
                        <th> </th>
                    </tr>
                    <tr>
                        <th> categoryAxisLabel </th>
                        <th> the label for the category axis </th>
                        <th>  	</th>
                    </tr>
                    <tr>
                        <th> categoryItemLabelGeneratorClass </th>
                        <th> Set implementing class (see <a href="http://www.jfree.org/jfreechart/api/javadoc/org/jfree/chart/labels/CategoryItemLabelGenerator.html">javadoc</a>) (#) </th>
                        <th> </th>
                    </tr>
                    <tr>
                        <th> categoryItemLabelGeneratorNumberFormat </th>
                        <th> (see constructors implementing class in <a href="http://www.jfree.org/jfreechart/api/javadoc/org/jfree/chart/labels/CategoryItemLabelGenerator.html">javadoc</a>) (#) </th>
                        <th> </th>
                    </tr>
                    <tr>
                        <th> categoryItemLabelGeneratorParameter </th>
                        <th> (see constructors implementing class in <a href="http://www.jfree.org/jfreechart/api/javadoc/org/jfree/chart/labels/CategoryItemLabelGenerator.html">javadoc</a>) (#) </th>
                        <th> </th>
                    </tr>
                    <tr>
                        <th> chartBackgroundColor </th>
                        <th> - </th>
                        <th> </th>
                    </tr>
                    <tr>
                        <th> domainAxisLabel </th>
                        <th> the label for the category axis </th>
                        <th> 	</th>
                    </tr>
                    <tr>
                        <th> height </th>
                        <th> Height of chart, default is 300 </th>
                        <th> 	</th>
                    </tr>
                    <tr>
                        <th> imageType </th>
                        <th> type of image: "png", "svg" or "svgz" </th>
                        <th> </th>
                    </tr>
                    <tr>
                        <th> legend </th>
                        <th> a flag specifying whether or not a legend is required </th>
                        <th> 	</th>
                    </tr>
                    <tr>
                        <th> order </th>
                        <th> the order that the data is extracted; "Column" (default) or "Row" </th>
                        <th> 	</th>
                    </tr>
                    <tr>
                        <th> orientation </th>
                        <th> the plot orientation; "Horizontal" (default) or "Vertical" </th>
                        <th>  	</th>
                    </tr>
                    <tr>
                        <th> pieSectionLabel </th>
                        <th> (see <a href="http://www.jfree.org/jfreechart/api/javadoc/org/jfree/chart/labels/StandardPieSectionLabelGenerator.html#StandardPieSectionLabelGenerator%28java.lang.String,%20java.text.NumberFormat,%20java.text.NumberFormat%29">javadoc</a>) </th>
                        <th> </th>
                    </tr>
                    <tr>
                        <th> pieSectionNumberFormat </th>
                        <th>  (see <a href="http://www.jfree.org/jfreechart/api/javadoc/org/jfree/chart/labels/StandardPieSectionLabelGenerator.html#StandardPieSectionLabelGenerator%28java.lang.String,%20java.text.NumberFormat,%20java.text.NumberFormat%29">javadoc</a>) </th>
                        <th> </th>
                    </tr>
                    <tr>
                        <th> pieSectionPercentFormat </th>
                        <th> (see <a href="http://www.jfree.org/jfreechart/api/javadoc/org/jfree/chart/labels/StandardPieSectionLabelGenerator.html#StandardPieSectionLabelGenerator%28java.lang.String,%20java.text.NumberFormat,%20java.text.NumberFormat%29">javadoc</a>) </th>
                        <th> </th>
                    </tr>
                    <tr>
                        <th> plotBackgroundColor </th>
                        <th> (#) </th>
                        <th/>
                    </tr>
                    <tr>
                        <th> rangeAxisLabel </th>
                        <th> the label for the value axis  </th>
                        <th>	</th>
                    </tr>
                    <tr>
                        <th> rangeLowerBound </th>
                        <th> (#)  </th>
                        <th/>
                    </tr>
                    <tr>
                        <th> rangeUpperBound </th>
                        <th> (#)  </th>
                        <th/>
                    </tr>
                    <tr>
                        <th> sectionColors </th>
                        <th> list of colors, applied sequentially to <a href="http://www.jfree.org/jfreechart/api/javadoc/org/jfree/chart/plot/PiePlot.html#setSectionPaint%28java.lang.Comparable,%20java.awt.Paint%29">setSectionPaint</a> (#) </th>
                        <th/>
                    </tr>
                    <tr>
                        <th> sectionColorsDelimiter </th>
                        <th> delimiter character for sectionColor </th>
                        <th>  </th>
                    </tr>
                    <tr>
                        <th> seriesColors </th>
                        <th> (#)  </th>
                        <th/>
                    </tr>
                    <tr>
                        <th> tableOrder </th>
                        <th> value "column" or "row" (see <a href="http://www.jfree.org/jfreechart/api/javadoc/org/jfree/chart/ChartFactory.html#createMultiplePieChart%28java.lang.String,%20org.jfree.data.category.CategoryDataset,%20org.jfree.util.TableOrder,%20boolean,%20boolean,%20boolean%29">javadoc</a>) (#) </th>
                        <th/>
                    </tr>
                    <tr>
                        <th> timeAxisColor </th>
                        <th> (#) </th>
                        <th/>
                    </tr>
                    <tr>
                        <th> timeAxisLabel </th>
                        <th> (#) </th>
                        <th/>
                    </tr>
                    <tr>
                        <th> title </th>
                        <th> the chart title   </th>
                        <th>	</th>
                    </tr>
                    <tr>
                        <th> titleColor </th>
                        <th>  (#)  </th>
                        <th/>
                    </tr>
                    <tr>
                        <th> tooltips </th>
                        <th> configure chart to generate tool tips?   </th>
                        <th>	</th>
                    </tr>
                    <tr>
                        <th> urls </th>
                        <th> configure chart to generate URLs?  </th>
                        <th/>
                    </tr>
                    <tr>
                        <th> valueAxisColor </th>
                        <th>  (#)  </th>
                        <th/>
                    </tr>
                    <tr>
                        <th> valueAxisLabel </th>
                        <th> the label for the value axis   </th>
                        <th>	</th>
                    </tr>
                    <tr>
                        <th> width </th>
                        <th> Width of chart, default is 400  </th>
                        <th/>
                    </tr>
                </table>
                <p>(#) indicates new added parameters. A small example:</p>
                <div class="ext:code?lang=xml"> &lt;configuration&gt;
    &lt;orientation&gt;Horizontal&lt;/orientation&gt;
    &lt;height&gt;500&lt;/height&gt;
    &lt;width&gt;500&lt;/width&gt;
    &lt;title&gt;Example 1&lt;/title&gt;
&lt;/configuration&gt; </div>
                <h3>c : chart data</h3>
                <p>Two of the JFreeChart datatypes can be used : <a href="http://jfree.org/jfreechart/api/javadoc/org/jfree/data/category/CategoryDataset.html">CategoryDataset</a> and <a href="http://www.jfree.org/jfreechart/api/javadoc/org/jfree/data/general/PieDataset.html">PieDataset</a>. The module attempts to determine and read the correct Dataset for a graph.</p>
                <p>For most of the charts the <span class="strong">CategoryDataset</span> is used. The structure of the data is as follows:</p>
                <div class="ext:code?lang=xml"> 
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!-- 
    Sample data for JFreeChart. 
    $Id: categorydata.xml 8835 2009-04-13 19:07:15Z dizzzz $ 
--&gt;
&lt;CategoryDataset&gt;
    &lt;Series name="Series 1"&gt;
        &lt;Item&gt;
            &lt;Key&gt;Category 1&lt;/Key&gt;
            &lt;Value&gt;15.4&lt;/Value&gt;
        &lt;/Item&gt;
        &lt;Item&gt;
            &lt;Key&gt;Category 2&lt;/Key&gt;
            &lt;Value&gt;12.7&lt;/Value&gt;
        &lt;/Item&gt;
        &lt;Item&gt;
            &lt;Key&gt;Category 3&lt;/Key&gt;
            &lt;Value&gt;5.7&lt;/Value&gt;
        &lt;/Item&gt;
        &lt;Item&gt;
            &lt;Key&gt;Category 4&lt;/Key&gt;
            &lt;Value&gt;9.1&lt;/Value&gt;
        &lt;/Item&gt;
    &lt;/Series&gt;
    &lt;Series name="Series 2"&gt;
        &lt;Item&gt;
            &lt;Key&gt;Category 1&lt;/Key&gt;
            &lt;Value&gt;45.4&lt;/Value&gt;
        &lt;/Item&gt;
        &lt;Item&gt;
            &lt;Key&gt;Category 2&lt;/Key&gt;
            &lt;Value&gt;73.7&lt;/Value&gt;
        &lt;/Item&gt;
        &lt;Item&gt;
            &lt;Key&gt;Category 3&lt;/Key&gt;
            &lt;Value&gt;23.7&lt;/Value&gt;
        &lt;/Item&gt;
        &lt;Item&gt;
            &lt;Key&gt;Category 4&lt;/Key&gt;
            &lt;Value&gt;19.4&lt;/Value&gt;
        &lt;/Item&gt;
    &lt;/Series&gt;
&lt;/CategoryDataset&gt;
</div>
                <p>For a subset of charts the <span class="strong">PieDataset</span> is used:</p>
                <div class="ext:code?lang=xml"> 
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!-- 
    A sample pie dataset for JFreeChart. 
    $Id: piedata.xml 8835 2009-04-13 19:07:15Z dizzzz $
--&gt;
&lt;PieDataset&gt;
  &lt;Item&gt;
    &lt;Key&gt;Java&lt;/Key&gt;
    &lt;Value&gt;15.4&lt;/Value&gt;
  &lt;/Item&gt;
  &lt;Item&gt;
    &lt;Key&gt;C++&lt;/Key&gt;
    &lt;Value&gt;12.7&lt;/Value&gt;
  &lt;/Item&gt;
  &lt;Item&gt;
    &lt;Key&gt;PHP&lt;/Key&gt;
    &lt;Value&gt;5.7&lt;/Value&gt;
  &lt;/Item&gt;
  &lt;Item&gt;
    &lt;Key&gt;Python&lt;/Key&gt;
    &lt;Value&gt;9.1&lt;/Value&gt;
  &lt;/Item&gt;
&lt;/PieDataset&gt;
 </div>
                <h2>Example</h2>
                <p>Putting it all together:</p>
                <img src="categorydata.png"/>
                <div class="ext:code?lang=xquery"> (: Example code for jfreechart module :)
(: Load the data files into /db :)
(: $Id: categorydata.xq 8838 2009-04-14 18:01:51Z dizzzz $ :)
declare namespace jfreechart = "http://exist-db.org/xquery/jfreechart";

jfreechart:stream-render("BarChart",

&lt;configuration&gt;
    &lt;orientation&gt;Horizontal&lt;/orientation&gt;
    &lt;height&gt;300&lt;/height&gt;
    &lt;width&gt;400&lt;/width&gt;
    &lt;title&gt;BarChart Example&lt;/title&gt;
&lt;/configuration&gt;, 

doc('/db/categorydata.xml')) </div>
                <p>and</p>
                <img src="piedata.png"/>
                <div class="ext:code?lang=xquery">(: Example code for jfreechart module :)
(: Load the data files into /db :)
(: $Id: piedata.xq 8838 2009-04-14 18:01:51Z dizzzz $ :)
declare namespace jfreechart = "http://exist-db.org/xquery/jfreechart";

jfreechart:stream-render("PieChart",

&lt;configuration&gt;
    &lt;orientation&gt;Horizontal&lt;/orientation&gt;
    &lt;height&gt;300&lt;/height&gt;
    &lt;width&gt;400&lt;/width&gt;
    &lt;title&gt;PieChart Example&lt;/title&gt;
&lt;/configuration&gt;, 

doc('/db/piedata.xml')) </div>
                <h2>More info</h2>
                <ul>
                    <li>A number of examples are <a href="https://exist.svn.sourceforge.net/svnroot/exist/trunk/eXist/extensions/modules/src/org/exist/xquery/modules/jfreechart/examples/">included with the code</a>
                    </li>
                    <li>A pre-compiled version of the extension can be downloaded from <a href="https://code.google.com/p/existdb-contrib/">existdb-contrib</a> (in exist-modules.jar).</li>
                </ul>
                <h2>Todo's</h2>
                <p>Code is never finished. Although in trunk the code has been reworked, there are always things that could be added....</p>
                <ul>
                    <li>Add more charts</li>
                    <li>Add further Dataset types</li>
                    <li>Make direct use of eXistdb nodes, instead of serializing data first to a data stream and have it parsed by the JFreechart parser. Current solution is multi-threaded though (serialize and parse on 2 separate threads)</li>
                    <li>Add function for showing all supported Graphs</li>
                    <li>Set parameters as provided by JFreeChart.class</li>
                    <li>Transparency etc etc</li>
                </ul>
            </div>
        </atom:content>
        <atom:link xmlns:atom="http://www.w3.org/2005/Atom" type="blog" href="/db/apps/wiki/data/blogs/dizzzz"/>
    </entry>
    <entry>
        <id>urn:uuid:f5c31b97-eb3a-4994-a208-f73f03027261</id>
        <updated>2011-09-24T17:02:19+02:00</updated>
        <published>2010-12-01T19:30:52+01:00</published>
        <link href="?id=urn:uuid:f5c31b97-eb3a-4994-a208-f73f03027261" rel="edit" type="application/atom+xml"/>
        <title type="text">Tip n Trick: upload and validate XML</title>
        <wiki:id xmlns:wiki="http://exist-db.org/xquery/wiki">TipnTrick</wiki:id>
        <author>
            <name>dizzzz</name>
        </author>
        <atom:content xmlns:atom="http://www.w3.org/2005/Atom" type="xhtml">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>I needed to be able to validate an XML document while the document should not be stored in the eXist-db database. The following code snipped shows how to do this</p>
                <div class="ext:code?lang=xquery">
declare namespace util = "http://exist-db.org/xquery/util";
declare namespace validation = "http://exist-db.org/xquery/validation";

(: get file as base64 data from request object :)
let $upload := request:get-uploaded-file-data("upload")
        
(: convert base64 to string :)
let $text := util:binary-to-string($upload)

(: parse into node :)
let $parsed := util:parse($text)

(: validate :)
let $report := validation:jaxv-report($parsed , xs:anyURI('/db/myschema.xsd'))
</div>
                <p>        </p>
            </div>
        </atom:content>
        <atom:link xmlns:atom="http://www.w3.org/2005/Atom" type="blog" href="/db/apps/wiki/data/blogs/dizzzz"/>
    </entry>
    <entry>
        <id>urn:uuid:ebdaf28d-584e-4278-8765-c424e718085e</id>
        <updated>2010-11-17T09:09:59+01:00</updated>
        <published>2010-11-17T09:09:06+01:00</published>
        <link href="?id=urn:uuid:ebdaf28d-584e-4278-8765-c424e718085e" rel="edit" type="application/atom+xml"/>
        <title type="text">WebDAV interface revamped</title>
        <wiki:id xmlns:wiki="http://exist-db.org/xquery/wiki">WebDAVinterfacerevamped</wiki:id>
        <author>
            <name>dizzzz</name>
        </author>
        <atom:content xmlns:atom="http://www.w3.org/2005/Atom" type="xhtml">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>In current trunk (starting 2010-10-01) and in the upcoming 1.4.x release the WebDAV interface has been reimplemented using the <a href="http://milton.ettrema.com "> Milton WebDAV</a> framework.</p>
                <p>The new implementation is considered better (more stable and better clients compatibility) than the original implementation.</p>
                <p>The documentation will be updated soon.</p>
            </div>
        </atom:content>
        <atom:link xmlns:atom="http://www.w3.org/2005/Atom" type="blog" href="/db/apps/wiki/data/blogs/dizzzz"/>
    </entry>
    <entry>
        <id>urn:uuid:1e7f4845-84d2-40bb-93a9-9855fffefa2e</id>
        <updated>2010-02-04T22:19:20+01:00</updated>
        <published>2009-10-20T22:24:54+02:00</published>
        <link href="?id=urn:uuid:1e7f4845-84d2-40bb-93a9-9855fffefa2e" rel="edit" type="application/atom+xml"/>
        <atom:title xmlns:atom="http://www.w3.org/2005/Atom" type="text">Set alternative XML parser</atom:title>
        <wiki:id xmlns:wiki="http://exist-db.org/xquery/wiki">SetAlternativeXMLparser</wiki:id>
        <atom:author xmlns:atom="http://www.w3.org/2005/Atom">
            <atom:name>dizzzz</atom:name>
        </atom:author>
        <wiki:position xmlns:wiki="http://exist-db.org/xquery/wiki">1</wiki:position>
        <atom:content xmlns:atom="http://www.w3.org/2005/Atom" type="xhtml">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>I committed my changes into trunk (1.4!) that enable us to use an alternative XML parser in eXist. I tried the fast <a href="http://piccolo.sourceforge.net/">Piccolo XML Parser for Java</a> but other JAXP compliant parsers should work as well.</p>
                <p>Note that the default Xerces jars must remain in lib/endorsed.</p>
                <ul>
                    <li>download the Piccollo jars from <a href=""/>
                    </li>
                    <li>install <em>Picollo.jar</em> into the <code>lib/user</code> directory</li>
                    <li>set the <code>JAVA_OPTIONS</code> system environment:
<code>export JAVA_OPTIONS="-Dorg.exist.SAXParserFactory=com.bluecast.xml.JAXPSAXParserFactory"</code>
                    </li>
                </ul>
                <p>and start existdb with bin/startup.sh ; in the logging you'll see that then Piccolo parser is actually used.</p>
                <h2>Need to know</h2>
                <ul>
                    <li>When validation is switched on, Piccolo automagically switches to a validating parser: xerces in most cases. </li>
                </ul>
                <h2>Known issues</h2>
                <ul>
                    <li>While loading the mondial example data the mondial dtd is still resolved, resulting in an exception.</li>
                </ul>
                <ul>
                    <li>On quite some code locations SAXParserFactory is called directly. Need to figure out what makes sense to update.</li>
                </ul>
            </div>
        </atom:content>
        <atom:link xmlns:atom="http://www.w3.org/2005/Atom" type="blog" href="/db/apps/wiki/data/blogs/dizzzz"/>
    </entry>
    <entry>
        <id>urn:uuid:4ddd7c3f-6db2-4db2-9a16-6ef0662805a8</id>
        <updated>2010-02-04T22:19:20+01:00</updated>
        <published>2009-04-26T18:21:27+02:00</published>
        <link href="?id=urn:uuid:4ddd7c3f-6db2-4db2-9a16-6ef0662805a8" rel="edit" type="application/atom+xml"/>
        <title type="text">Jetty5 to Jetty6 migration</title>
        <wiki:id xmlns:wiki="http://exist-db.org/xquery/wiki">Jetty5toJetty6</wiki:id>
        <author>
            <name>dizzzz</name>
        </author>
        <wiki:position xmlns:wiki="http://exist-db.org/xquery/wiki">2</wiki:position>
        <atom:content xmlns:atom="http://www.w3.org/2005/Atom" type="xhtml">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>Recently I started to work on the upgrade of the webserver that is used internally by eXist-db: Jetty.</p>
                <p>The migration from Jetty5 to Jetty6 turns out not to be straight forward, quite some things have changed there. Progress on this project will be posted here, together with links to important documentation.</p>
                <ul>
                    <li>Upgrade of libraries done (done)</li>
                    <li>... added servlet-api-2.5-6.x.jar jetty-util-6.x.jar jetty-6.x.jar</li>
                    <li>... removed jasper jars ; we don't need them I think because we have no JSPs?</li>
                    <li>Need to check Tomcat jar; can this file be deleted?</li>
                    <li>We should move the servlet-api-jar in lib/core to /lib/optional ?</li>
                </ul>
                <h2>Links</h2>
                <ul>
                    <li>
                        <a href="http://docs.codehaus.org/display/JETTY/Porting+to+jetty6 "> Porting to Jetty6</a>
                    </li>
                    <li>
                        <a href="http://docs.codehaus.org/display/JETTY/Embedding+Jetty "> Embedding jetty</a>
                    </li>
                    <li>
                        <a href="http://www.engidea.com/blog/informatica/jetty6/jetty6-explored.html "> Jetty6 Trial and Exploration</a>
                    </li>
                </ul>
            </div>
        </atom:content>
        <atom:link xmlns:atom="http://www.w3.org/2005/Atom" type="blog" href="/db/apps/wiki/data/blogs/dizzzz"/>
    </entry>
    <entry>
        <id>urn:uuid:d5650a0e-73e8-42be-98c8-142eb0ac33e6</id>
        <updated>2010-02-04T22:19:20+01:00</updated>
        <published>2008-11-28T22:21:12+01:00</published>
        <link href="?id=urn:uuid:d5650a0e-73e8-42be-98c8-142eb0ac33e6" rel="edit" type="application/atom+xml"/>
        <title type="text">Update on JSR-225</title>
        <wiki:id xmlns:wiki="http://exist-db.org/xquery/wiki">UpdateJsr225</wiki:id>
        <author>
            <name>dizzzz</name>
        </author>
        <wiki:position xmlns:wiki="http://exist-db.org/xquery/wiki">4</wiki:position>
        <atom:content xmlns:atom="http://www.w3.org/2005/Atom" type="xhtml">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>At this moment we are working on the XQJ a.k.a. jsr-225 drivers for the eXist database. We are quite close to integration the code into 1.3/trunk, small steps still need to be taken.</p>
                <p>For those who cannot wait:</p>
                <ul>
                    <li>
                        <a href="http://exist.svn.sourceforge.net/viewvc/exist/branches/allad/jsr-225/">Subversion</a>
                    </li>
                    <li>
                        <a href="http://jcp.org/aboutJava/communityprocess/pfd/jsr225/index.html">Specification</a>
                    </li>
                </ul>
                <p>The interface is tested in the junit test suite, but Oracle supplies a vendor independent testsuite as well. Due to licensing limitations this code cannot be included in the eXist-db distribution, but these can be downloaded easily.</p>
                <ul>
                    <li>Download the Oracle files with <code>./build.sh prepare-jsr225</code>
                    </li>
                </ul>
                <p>remote:</p>
                <ul>
                    <li>For remote tests: start database <code>./bin/startup.sh</code>
                    </li>
                </ul>
                <ul>
                    <li>Start the test suite: <code>./build.sh test-prepare test-jsr225-remote test-wrapup</code>
                    </li>
                </ul>
                <ul>
                    <li>Check the results in <code>./test/junit/html/index.html</code>
                    </li>
                </ul>
                <p>local:</p>
                <ul>
                    <li>Start the test suite: <code>./build.sh test-prepare test-jsr225-local test-wrapup</code>
                    </li>
                </ul>
            </div>
        </atom:content>
        <atom:link xmlns:atom="http://www.w3.org/2005/Atom" type="blog" href="/db/apps/wiki/data/blogs/dizzzz"/>
    </entry>
    <entry>
        <id>urn:uuid:8f20af4e-7077-4bbb-ad2d-0043f6d42fcd</id>
        <updated>2011-09-24T17:03:46+02:00</updated>
        <published>2008-11-28T21:33:41+01:00</published>
        <link href="?id=urn:uuid:8f20af4e-7077-4bbb-ad2d-0043f6d42fcd" rel="edit" type="application/atom+xml"/>
        <title type="text">Some Module Issues</title>
        <wiki:id xmlns:wiki="http://exist-db.org/xquery/wiki">SomeModuleIssues</wiki:id>
        <author>
            <name>dizzzz</name>
        </author>
        <atom:content xmlns:atom="http://www.w3.org/2005/Atom" type="xhtml">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>As most of you (should) know by know, eXist does support xquery modules. With this it is possible to efficiently re-use xquery code. A small xquery example:</p>
                <div class="ext:code?lang=xquery">
import module namespace mod1 = "urn:module1" at  "module1.xqm";

&lt;a&gt;
 &lt;b&gt;{mod1:showMe()}&lt;/b&gt;
&lt;/a&gt;
</div>
                <p>and a not too complex module:</p>
                <div class="ext:code?lang=xquery">
module namespace mod1 = "urn:module1";

declare function mod1:showMe() as xs:string {
	"hi from module 1"
};
</div>
                <p>In this example the module is located in the same collection as the query; This rather simple query-module relation works perfectly and is used in many applications. Things get more difficult when a module itself has a relation  with one ore more modules.</p>
                <p>It turns out that modules are always resolved relative to the 'first executed' xquery. That means that if your module imports another module (e.g. module3.xqm in collection sub) special things happen:</p>
                <p>Layout:
<code> /db/query.xq
/db/collection/module2.xqm
/db/collection/sub/module3.xqm </code>
                </p>
                <p>In this example query.xq imports module2.xqm and module2.xqm imports module3.xqm ; One would expect that the following code would be sufficient for module2.xqm:</p>
                <div class="ext:code?lang=xquery">
import module namespace mod3 = "urn:module3" at  "sub/module3.xqm";
</div>
                <p>What actually happens is that the query engine tries to resolve module3.xqm from /db/sub/module3.xqm. The only solution to have the module loaded correctly, is to specify a full path in the database:</p>
                <div class="ext:code?lang=xquery">
import module namespace mod3 = "urn:module3" at  "xmldb:///db/collection/sub/module3.xqm";
</div>
                <p>The bad thing about this construct is that it makes your application less portable/movable. </p>
                <p>I think this limitation does not make sense. I'll investigate this issue and 'll (try to) make a fix for it (unless Perig disagrees with the solution :-) )</p>
            </div>
        </atom:content>
        <atom:link xmlns:atom="http://www.w3.org/2005/Atom" type="blog" href="/db/apps/wiki/data/blogs/dizzzz"/>
    </entry>
    <entry>
        <id>urn:uuid:7e829d07-1af0-44a6-81cb-03ca380893a7</id>
        <updated>2008-09-08T10:43:26+01:00</updated>
        <published>2008-09-06T12:43:19+01:00</published>
        <link href="?id=urn:uuid:7e829d07-1af0-44a6-81cb-03ca380893a7" rel="edit" type="application/atom+xml"/>
        <title type="text">Java Webstart and Servlet containers</title>
        <wiki:id xmlns:wiki="http://exist-db.org/xquery/wiki">TomcatIssues</wiki:id>
        <author>
            <name>dizzzz</name>
        </author>
        <atom:content xmlns:atom="http://www.w3.org/2005/Atom" type="xhtml">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>This week there was <a href="http://www.nabble.com/Question-about-the-webstart-admin-tt19314091.html#a19314091">an issue reported</a> concerning the code that enables the download of the InteractiveClient via <a href="http://en.wikipedia.org/wiki/Java_Web_Start">Java Webstart</a>. According to the report the code was not able to find the relevant jar files.</p>
                <p>In short some context: <code>JnlpHelper.java </code> retrieves information of the location of eXist and the jar files by calling <code>ConfigurationHelper.getExistHome() </code> which -somehow- does not always return the right value. Since we had some issues before with this class, I wanted to try something else.</p>
                <p>According to the servlet specification the best way of retrieving the location of files in a servlet context (on server extracted from war-file) is calling <a href="http://java.sun.com/products/servlet/2.3/javadoc/javax/servlet/GenericServlet.html#getServletContext()">getServletContext</a>().<a href="http://java.sun.com/products/servlet/2.3/javadoc/javax/servlet/ServletContext.html#getResource(java.lang.String)">getResource</a>("/") ; this should return a <code>
                        <a href=""/>
                    </code> styled URL to the toplevel directory of exist.</p>
                <p>Unfortunately this does not work for tomcat. Tomcat does actually return a <code>
                        <a href=""/>
                    </code> type URL which cannot be resolved to a 'real' directory. There are several reports on this subject and is for us a dead end.</p>
                <p>The other servlets of eXist-db use another construction to get the application directory information: getServletContext().<a href="http://java.sun.com/products/servlet/2.3/javadoc/javax/servlet/ServletContext.html#getRealPath(java.lang.String)">getRealPath</a>("/") but (quote: javadoc) </p>
                <blockquote>The real path returned will be in a form appropriate to the computer and operating system on which the servlet container is running, including the proper path separators. This method returns null if the servlet container cannot translate the virtual path to a real path for any reason (such as when the content is being made available from a .war archive).</blockquote>
                <p>There were <a href="http://www.nabble.com/New-to-eXist---please-help%21--long--tt7204394.html#a7352116 "> some discussions</a> on this a few years ago on the ML, but in the end it turns out that we do not have a real alternative than using getRealPath().</p>
                <p>The consequence of this decision is that eXist-db cannot run in webcontainers that </p>
                <ul>
                    <li>do not expand the war files when installed</li>
                    <li>block access to the local filesystem. (This does not make sense anyhow, because exist does actually need to write data to 'some' file location.)</li>
                </ul>
                <p>The webstart fix is now part of 1.3/trunk and 1.2.5.</p>
            </div>
        </atom:content>
        <atom:link xmlns:atom="http://www.w3.org/2005/Atom" type="blog" href="/db/apps/wiki/data/blogs/dizzzz"/>
    </entry>
    <entry>
        <id>urn:uuid:6502133c-c608-454e-962f-60c20878e776</id>
        <updated>2008-01-14T18:26:14+00:00</updated>
        <published>2007-12-16T16:31:54+00:00</published>
        <link href="?id=urn:uuid:6502133c-c608-454e-962f-60c20878e776" rel="edit" type="application/atom+xml"/>
        <title type="text">ChangeLog 1.2</title>
        <wiki:id xmlns:wiki="http://exist-db.org/xquery/wiki">ChangeLog12</wiki:id>
        <author>
            <name>wolf</name>
        </author>
        <atom:content xmlns:atom="http://www.w3.org/2005/Atom" type="xhtml">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <ul>
                    <li>Fixed in-memory DOM tree construction bug: in some very specific cases, constructed nodes were skipped during serialization and did not show up in the output.</li>
                    <li>Bug fix: cached password for remote XMLDB API connection is not properly reset after a user's password was changed.</li>
                    <li>On db shutdown, properly unregister all JMX MBeans.</li>
                    <li>XInclude filter: properly implement <a href=""/>
                    </li>
                    <li>Fixed XPath bug: for some descendant-axis queries on nested elements, duplicate nodes were not filtered out properly. The query engine returned duplicate results.</li>
                    <li>Prevented NPE's in ant tasks.</li>
                    <li>reading collection.xconf is now fail safe. Errors in the configuration document will not cause an exception.</li>
                    <li>Temporary workaround for bug <a href=""/> "Invalid collection.xconf causes a non startable database"</li>
                    <li>New functions <a href=""/> gives you the xpath of a node, attributes in the hierarchy are converted to predicates</li>
                    <li>Fix <a href=""/> NPE in bad-formed module URI</li>
                    <li>Fixed <a href=""/> NPE upon update delete of root element</li>
                    <li>Fixed namespace issue: in-scope namespace declarations were not properly visible to functions located in other modules. </li>
                    <li>Enhanced rendering of XQuery Function Documentation.</li>
                    <li>Clean up SAXSerializer instances before returning them to the pool.</li>
                    <li>Fixed concurrency issue: built-in XQuery modules </li>
                    <li>Fixed base-uri() call on document node causing a class cast exception</li>
                    <li>Fixed locking issue where permission exception caused lock on collection not to be released.</li>
                    <li>Build jmx extensions into extra jar lib/extensions/exist-jmx.jar. </li>
                    <li>Fixed the HistoryTrigger </li>
                    <li>Applied patch 1775400 supplied by Michael Westbay</li>
                    <li>Fixed deficiencies in computed document constructors : they should allow nested document constructors</li>
                    <li>Fixed chmod/chown implementation</li>
                    <li>Added function <a href=""/>
                    </li>
                    <li>Applied <a href=""/> Get collection cache size for Cache stats; patch by Gary Larsen</li>
                    <li>Applied patch <a href=""/> Fix adminClient's dialog gridBag resizing ; Kindly contributed by Avagvwctopoulos Koctis (sperxios)</li>
                    <li>Use launch4j to generate a native windows .exe wrapper around the generated installer. Without this, eXist will not install properly on windows vista.</li>
                    <li>Applied patch #1824991, webdav lock operation does not meet RFC4918 requirements, supplied by Brad Clements.</li>
                    <li>Updated log4j to 2.1.15</li>
                    <li>Catch NPE in NativeBroker.getTextSearchEngine and log a warning.</li>
                    <li>Fixed parser bug (ignoring whitspace)</li>
                    <li>Fixed another positional predicate bug</li>
                    <li>Fixed NPEs if request/response/session object is not in scope and a function is called</li>
                    <li>Fixed a bug in <a href=""/>
                    </li>
                    <li>Fixed: &amp;#x3c;<a href=""/>&amp;#x3e; tags lost during ancestor or parent path steps.</li>
                    <li>Fixes for various issues which improved XQTS results a lot. </li>
                    <li>Updated <a href=""/> uses the user in the current xquery context</li>
                    <li>Added RedirectorServlet as a different, maybe more powerful mechanism to redirect HTTP requests. </li>
                    <li>Added some missing HTTP request functions: <a href=""/>
                        <a href=""/>
                        <a href=""/>
                    </li>
                    <li>Removed <a href=""/> passing a Java Collection Object </li>
                    <li>Libraries from lib/extensions need to be copied into the war distribution as well.</li>
                    <li>Split of modules into seperate jars, and moved all modules to lib/extensions</li>
                    <li>Fixed bugs in <a href=""/>
                    </li>
                    <li>Fixed XQTS test base-URI-18 regression</li>
                    <li>Fixed <a href=""/> construction bug. </li>
                    <li>Fixed: Another NGram bug fix: matches were not tagged if the query result was included into a constructed node.</li>
                    <li>Fix for <a href=""/> NPE in <a href=""/>
                    </li>
                    <li>Added xsl-fo extension module</li>
                    <li>Applied <a href=""/> Patch to fix NPE in CollectionCache on startup</li>
                    <li>Applied <a href=""/> NPE in CollectionCache on startup</li>
                    <li>Don't approximate in seconds-from-duration()</li>
                    <li>Fix for <a href=""/> Double default namespace</li>
                    <li>Added function <a href=""/>, which encodes a string into a value of type <a href=""/>
                    </li>
                    <li>Clean up of loged SAXParseExceptions.</li>
                    <li>Validation is now configurable per collection, just like range indexes. </li>
                    <li>Validation: Added namespace of root element of parsed document to validation report.</li>
                    <li>Fixed a BTree bug which led to stack overflows. It seems this could have caused db corruptions in some cases.</li>
                    <li>Added new function <a href=""/>, which uses the neko HTML parser to parse an HTML string into well-formed XML.</li>
                    <li>Small modifications in function <a href=""/> to avoid another NullPointerException.</li>
                    <li>Fixed NullPointerException in DocumentImpl.</li>
                    <li>Added function <a href=""/>:string?) to parse a string value into an XML fragment. </li>
                    <li>webDAV: extended DAV header: webdav version 1 and 2 are now reported, OPTIONS: added method DELETE, COPY, MOVE</li>
                    <li>Fixed ConcurrentModificationException in Collection, which was leading to a deadlock.</li>
                    <li>Extended logging regarding webdav.</li>
                    <li>Fixed NPE during shutdown.</li>
                    <li>Misc validation improvements</li>
                    <li>
                        <a href=""/> will have extra attribute 'repeat' when error message is reported more than once</li>
                    <li>Fixed: executing query the first time included <span class="strong">all</span> documents in the database, though it was executed in the context of a single collection.</li>
                    <li>Fixed bug 1691177 leading to "attribute X has no parent" error.</li>
                    <li>Fixed bug 1691177 leading to "attribute X has no parent" error.</li>
                    <li>Introduced FODC0002 error in <a href=""/>
                    </li>
                    <li>Introduced a new <a href=""/> function that will be needed by the XQTS app. </li>
                    <li>Deprecated <a href=""/> in favour of <a href=""/>
                    </li>
                    <li>Deprecated <a href=""/> in favour of <a href=""/>
                    </li>
                    <li>Improve performance of CollectionConfigurationManager by replacing XmldbURI with CollectionURI.</li>
                    <li>Fixed <a href=""/> Wrong illegal type error message</li>
                    <li>Fixed locking issue: collection was modified without being locked.</li>
                    <li>Major redesign with respect to collection configurations (to fix an existing memory leak)</li>
                    <li>Fixed remaining bugs in in-scope-prefixes() and namespace-uri()</li>
                    <li>Fixed 'string' cast as <a href=""/>
                    </li>
                    <li>Improved <a href=""/> which now passes all the XQTS tests. </li>
                    <li>Experimental: added a "<a href=""/>" pragma which can be used to force eXist to not use the structural index to select nodes.</li>
                    <li>Applying SF Patch 1768921 - fix for SQL Extension module for properly closing JDBC connections, recordsets and statements. </li>
                    <li>More deadlock issues fixed. Better deadlock detection: identifies circular wait dependencies and throws a DeadlockException if automatic resolution is not possible.</li>
                    <li>
                        <a href=""/> extended to append fragments of different node types.</li>
                    <li>Update for webdav inferface: fixed NPE for UNLOCK method, MacOsX fix: allow storage of 0 byte XML documents (xml place holder)</li>
                    <li>Added NGram functions <a href=""/> and <a href=""/>
                    </li>
                    <li>Corrected free memory computation: reserve at least 20% of the max. memory for emergency.</li>
                    <li>Applied <a href=""/> New function: Deep-Copy ; Scott Warren - ocomsoft</li>
                    <li>Partly implemented <a href=""/> propose borrowing Ant's patch.xml and check.xml</li>
                    <li>Applied <a href=""/> LDAP passwords patch ; Submitted By  andrewuwe </li>
                    <li>Applied patch <a href=""/> Control number of backup files ; Submitted By: Gary Larsen </li>
                    <li>Applied <a href=""/> Fix for validation against Schemas using a namespace</li>
                    <li>Fixed potential ArrayIndexOutOfBounds exception.</li>
                    <li>Permit storage of binary resources using <a href=""/>
                    </li>
                    <li>Webdav-html page: binary file size are rounded</li>
                    <li>Fix for webdav ; collections now browseable again for webbrowsers (<a href=""/>
                    </li>
                    <li>Another deadlock fix: detect and handle a circular wait on different resources.</li>
                    <li>Fixed <a href=""/> URL Handler shows ERROR in log, but works OK</li>
                    <li>Multiple grammar catalogs should be allowed for validation</li>
                    <li>Fix for WebDAV: webdav interface can now be mounted my MacOsX 'Finder'. </li>
                    <li>Added compression module :  <a href=""/>
                    </li>
                    <li>Redesigned exist startup scripts (.sh .bat)</li>
                    <li>Added JMX agent to eXist. </li>
                    <li>Another deadlock fix: XPathQueryService.beginProtected/endProtected need to reserve a DBBroker between the two calls.</li>
                    <li>Validation of XML using DTD's fail when using the XMLgrammarPool. Seem to be a xerces issue. added workaround</li>
                    <li>Fixed bug 1687079: "Extension module namespaces missing". </li>
                    <li>Fixed bug 1683636: "<a href=""/> fails on function in module". Imported modules are now visible within the eval() function.</li>
                    <li>Applied patch 1739796: REST server patch for text/html mimetype</li>
                    <li>Fixed bug 1740891: <a href=""/> looses its context. ModuleContext needs to overwrite XQueryContext.copyContext.</li>
                    <li>Fixed bug 1740880: Element construction with namespace</li>
                    <li>Fixed bug 1740885: ne operator does not work.</li>
                    <li>Validation: implicit/explicit validation share grammar caching</li>
                    <li>Fixed deadlock issues</li>
                    <li>Fixed: NodePool grew without bounds, thus causing memory issues after a while.</li>
                    <li>Made validation report more usable</li>
                    <li>Further updates to the SOAPServer to provide better interoperability </li>
                    <li>Added new extension package org.exist.fluent, an API for databases running in embedded mode that takes advantage of Java 5.0 features.</li>
                    <li>Committing patches by José María Fernández, add's RPC encoded style alongside document literal style.</li>
                    <li>Added indexes: N-gram and Spatial</li>
                    <li>Fixed NPE in serializer.</li>
                    <li>
                        <a href=""/> functions now accept <a href=""/> instead of <a href=""/> less convenient, butter better to the specs</li>
                    <li>Deadlock conditions found and fixed.</li>
                    <li>Revision of validation function. A year of work.... promised in Prague (2006)</li>
                    <li>Fixed long standing issue regarding <a href=""/> and <a href=""/>
                    </li>
                    <li>Fixed doc(<a href=""/>"<a href=""/>")) </li>
                    <li>Do not enforce XPath 1.0 compatibility.</li>
                    <li>Fixed an NPE on the resolver.</li>
                    <li>Fixed two major flaws in our implementation of document locks.</li>
                    <li>Fixed: min() and max() can not operate on QNames</li>
                    <li>Fixed <a href=""/> "&amp;#x3c;" and "&amp;#x3e;" are escaped in comments</li>
                    <li>Fixed <a href=""/> NPE in client index tool</li>
                    <li>Fixed <a href=""/> Incorrect filename displayed in status ; patch by Gary Larsen</li>
                    <li>Added implementation of custom protocol handler for <a href=""/> ; </li>
                    <li>Added: Classes that implement a ring buffer. To be used by upcoming xml validation features and exist protocol handler. </li>
                    <li>webdav: Fixed locking issue in webdav/MKCOL </li>
                    <li>Fix <a href=""/> Webstart: missing sTax jar</li>
                    <li>New HTTPModule.</li>
                    <li>Added "add-exist-id=element|all|none" to the available serialization options. T</li>
                    <li>Repaired unwanted dependency with org.apache.commons.pool.PoolableObjectFactory (caused NoClassDefFoundError for OxygenXml).</li>
                    <li>
                        <a href=""/> now uses ValueComparison as per the specs</li>
                    <li>Fixed XQuery bug: optimized path step on descendant axis sometimes ignored child nodes! Example: //a<a href=""/> where b is a child of a.</li>
                    <li>Upgrade to ant 1.7.0, 4.x and xmlunit 1.1</li>
                    <li>Added <a href=""/>
                    </li>
                    <li>Implement <a href=""/> according to the specs.</li>
                    <li>Fixed ClassCastExceptions.</li>
                    <li>Fixed possible memory leak in optimizable expressions.</li>
                    <li>Added an option to disable/enable optimizations at runtime: declare option <a href=""/> "enable=yes|no";</li>
                    <li>The <a href=""/> pragma now also understands an optional "enable" parameter: //((#<a href=""/> enable=no#) { foo<a href=""/> })</li>
                    <li>Fixed issue with globally declared variables. </li>
                    <li>Small change in XmldbURI to avoid creating URIs too frequently.</li>
                    <li>Installer: ask for admin Password </li>
                    <li>Fixed performance leak: expressions like /nodeA/<span class="strong">/nodeB were extremely slow.</span>
                    </li>
                    <li>Changed XInclude to be compliant with the specs. </li>
                    <li>Fixed bug in XQuery lexer</li>
                    <li>Handle these corner test cases : <a href=""/>,"") <a href=""/>,"") <a href=""/>,"")</li>
                    <li>Fixed return type of String-derived atomic values.</li>
                    <li>Binary storage format changed!!!!</li>
                    <li>Low-level changes in the B+tree code: use prefix compression for keys stored in leaf pages.</li>
                    <li>Better processing of return type in avg() and sum()</li>
                    <li>Missing EXIST_HOME causes some tests to fail.</li>
                    <li>Fixed: range indexes were not properly updated after removing a node. </li>
                    <li>Image: added <a href=""/>
                    </li>
                    <li>Fixed lack of timezone in gMonth string value.</li>
                    <li>Fixed: XQuery parser complained about "in" as element name: &amp;#x3c;root&amp;#x3e;&amp;#x3c;in&amp;#x3e;foo&amp;#x3c;/in&amp;#x3e;&amp;#x3c;/root&amp;#x3e;.</li>
                    <li>Made base-uri() consistent between in-memory and persistent nodes.</li>
                    <li>Fixed client to work in headless mode again</li>
                    <li>XUpdate performance improvments.</li>
                    <li>New: Modularized indexing architecture.</li>
                    <li>Added new function, <a href=""/>
                    </li>
                    <li>When executing a query via the REST interface, the base URI property of the query should be set to the collection path specified in the query.</li>
                    <li>Register stax-api-1.0.1.jar which is required by all Java versions &amp;#x3c; 1.6</li>
                    <li>Implemented java.xml.stream.XMLStreamReader for fast DOM traversals in embedded mode. </li>
                    <li>Fixed <a href=""/> Startup scripts fail under solaris</li>
                    <li>Applied patch by Christian Salm: NPE in NativeBroker when recovery is turned off.</li>
                    <li>Fixed <a href=""/> left hand operand of a general comparison involves nodes that do not belong to the context sequence's document set.</li>
                    <li>Optimize now works on multi-predicate expressions</li>
                    <li>Fixed: the SOAP interface refused to accept any query containing an ampersand, e.g. //foo<a href=""/>
                    </li>
                    <li>Optimize <a href=""/>
                    </li>
                    <li>Applied patch <a href=""/> users' groups eXtensions by Massimo Martinelli, Marco Tampucci, and Ovidio Salvetti </li>
                    <li>Updated Java service wrapper.jar to version 3.2.3.</li>
                    <li>Set HTTP status if XQuery source file could not be found.</li>
                    <li>New combined range index on named element or attribute. </li>
                    <li>Added <a href=""/> generator, Updated webdav and atom code to use new UUIDgen classes.</li>
                    <li>Fixed: resolver.jar not found by Cocoon-block build.</li>
                    <li>We only need one Base64 encoder/decoder in eXist. Favour org.exist.util.Base64Encoder</li>
                    <li>Fixed <a href=""/> function without argument (used to throw ArrayIndexOutOfBounds).</li>
                    <li>During backup, ignore already existing <em>contents</em>.xml files in the database. </li>
                    <li>Fixed NPE in fulltext query.</li>
                    <li>Fixed: the xmlrpc interface (via methods upload/parseLocal) changed the mime-type of a resource to application/octet-stream if it could not determine the mime-type from the file name.</li>
                    <li>Image: Added a scale() function.</li>
                    <li>Applied patch: <a href=""/> Search classpath for eXist's home</li>
                    <li>Applied patches (16289750/1628975) Ststaus generator;  by Gary Larsen
-<a href=""/> Cache usage info for StatusGenerator
Displays stats and graph of cache size usage. Also modified some graph colors so that buffer hits are green (green is good) and a glance can spot problems.</li>
                    <li>Added file format version id to symbols.dbx to inform user of changes in the binary storage format.</li>
                    <li>Fixed QName serialization bug. </li>
                    <li>Atom: added support for getting atom entries by id</li>
                    <li>Webstart: Updated asocat/pack200 compression library. </li>
                    <li>Fixed: fulltext lookups with wildcards (e.g. para &amp;#x26;= "sinnlich<span class="strong">") were partially broken.</span>
                    </li>
                    <li>Fixed slow queries on //</li>
                    <li>Fixed match-count behaviour</li>
                    <li>Fixed: support for multiple unary operators, e.g. 7, +-9</li>
                    <li>Fixed nested document construction bug:</li>
                    <li>Fixed string representation of in-memory attributes : let attr := attribute d { "xxx" } return string(attr)</li>
                    <li>Fix for <a href=""/> HTML: cardinality issue in <a href=""/>
                    </li>
                    <li>webDAV improved error messages on 'PUT'</li>
                    <li>Fixed class cast exception  in : let x := 1.1 return x div <a href=""/>
                    </li>
                    <li>
                        <a href=""/> should return false if the document exists but is not a binary resource.</li>
                    <li>Added dedicated performance test suite. Call with "build.sh benchmark", output goes into test/benchmark.</li>
                    <li>Fixed NPE in CollectionCache.</li>
                    <li>Fix for <a href=""/> decoding resources names in webadmin interface</li>
                    <li>Improved string representation of decimal values (XQTS)</li>
                    <li>Changed <a href=""/> to accept an empty sequence as start string</li>
                    <li>Added some tests for fulltext index by qname.</li>
                    <li>Added commons daemon code</li>
                    <li>Fixed: binary resource could not be removed via the web interface</li>
                    <li>
                        <a href=""/>, <a href=""/> and <a href=""/> should work with binary resources as well</li>
                    <li>Bug fix: acquired lock not properly released in functions <a href=""/> and <a href=""/>
                    </li>
                    <li>Applied fix for <a href=""/> HTML admin: size of binary docs too accurate</li>
                    <li>Applied <a href=""/> add getServletContext to HttpSessionWrapper</li>
                    <li>Log any exceptions whilst sending SMTP mail and fix the truncated subject encoding problem</li>
                    <li>Fix NPE in NativeValueIndex.</li>
                    <li>xmlrpc: parseLocal should return 'true' when document is successfully inserted</li>
                    <li>Updated to XForms Filter 1.2 a lighter distribution, and updated to the latest version of Chiba</li>
                    <li>Improve performance of self axis queries in <a href=""/>
                    </li>
                    <li>The collection cache is now adaptive, which means it can grow under load. The limit is set in conf.xml.</li>
                    <li>Smaller performance improvements in node sets.</li>
                    <li>Bug 1589927: Fixed NPEs in quantified expressions with specified sequence type. </li>
                    <li>Webstart: should not throw exception/500 for incorrect filename extension</li>
                    <li>Webstart: <a href=""/> Make webstart jar-download more robust</li>
                    <li>Webstart: <a href=""/> Add DateHeader to jnlp download servlet</li>
                    <li>Make (#<a href=""/> work with other axes than child.</li>
                    <li>Fixed a critical bug leading to failures during crash recovery, usually followed by a data corruption.</li>
                    <li>XMLRPC: getDocumentData/getNextChunk could not handle binary documents.</li>
                    <li>Small performance improvement (to speed up document removal).</li>
                    <li>Updated commons httpclient to 3.0.1</li>
                    <li>New optimization pragma (# <a href=""/> #). Can currently be used in combination with a named fulltext index (see above) and the fulltext operators/functions &amp;#x26;=, |= and near().</li>
                    <li>
                        <a href=""/> now returns an empty sequence instead of an empty string. Not compliant with the specs but compliant with the XQTS and Saxon.</li>
                    <li>Allowed user to switch authenticated user for the session if they re-send the Basic auth header</li>
                    <li>Bug: Nodes not properly update in fulltext index after deletion. Wrong node id comparison.</li>
                    <li>Added gev's profile pragma.</li>
                    <li>Moved jars to lib/user.</li>
                    <li>Added back service daemon class for commons daemon startup</li>
                    <li>Fixed: When an HTML file is inserted into eXist, it is converted to XML first using NekoHTML </li>
                    <li>Make sure the Scheduler is shutdown when shutting down eXist</li>
                    <li>Implemented <a href=""/>
                    </li>
                    <li>Added new standard function : normalize-unicode() (relies on the ICU4J library)</li>
                    <li>Fixed <a href=""/>"he",2) which should return "2", not an empty string.</li>
                    <li>Webstart: added support for Pack200/gzip shrinked jar files.</li>
                    <li>deprecated doctype() in the fn namespace. Moved it to the util NS...</li>
                    <li>
                        <a href=""/> and <a href=""/> are deprecated. Use <a href=""/> instead.</li>
                    <li>Fixed: in an enclosed expression, an element was sometimes added as text if the previous node was a text node.</li>
                    <li>Changed the type of maxAge to <a href=""/> (instead of int seconds) for <a href=""/>
                    </li>
                    <li>
                        <a href=""/> and <a href=""/> failed to work with a relative URL for the collection, e.g. <a href=""/>"/db", "admin", ""). Fixed.</li>
                    <li>Applied patch provided by Robert Koberg - <a href=""/> Rest Authentication ; Also added code to store an authenticated user in the session</li>
                    <li>Patch 1588840 applied to the SOAP Server. Allow's XML Fragments. Fixes SOAP-ENV prefix. Fixes NPE when requested XQWS doesnt exist. Thank you José María Fernández</li>
                    <li>Added <a href=""/>
                    </li>
                    <li>Implemented codepoint-equal() function</li>
                    <li>Addressed range-indexed attributes.</li>
                    <li>Improved error message</li>
                    <li>Reviewed the way arithmetic operations (division) are handled.</li>
                    <li>Fixed memory leak: byte buffers for caching index data would never shrink. Limit those buffers to 64K max.</li>
                    <li>Improved the design of some fulltext related functions</li>
                    <li>Cleaned code in GeneralComparison</li>
                    <li>Added "group by" patch from Boris Verhaegen </li>
                    <li>Made code more robust in min()/max()</li>
                    <li>Enforce param check in <a href=""/>
                    </li>
                    <li>Fixed a few local namespace-uri issues that were reported by the XQTS.</li>
                    <li>Added pragma  <a href=""/>
                    </li>
                    <li>Added more genericity in code.</li>
                    <li>Fixed: inserting a CDATA node via an XQuery update command led to an exception</li>
                    <li>Added ability to schedule with Cron timings and added an UserXQueryJob for scheduling XQuery jobs. </li>
                    <li>Added an extension module for performing scheduler related functions</li>
                    <li>Bug fix: overwriting a binary resource with an XML document led to a database corruption.</li>
                    <li>Introduced new Scheduler based on Quartz</li>
                    <li>Added function <a href=""/>
                    </li>
                    <li>Move jUnit tests to separate code tree ; additional changes will follow</li>
                    <li>Fixed: In-memory CDATA were not serialized at all</li>
                    <li>Added a new method inside xmlrpc isInServiceMode</li>
                    <li>Updated Javadocs.</li>
                    <li>Added new "service mode": a dba admin user can now switch the database into a protected service mode. </li>
                    <li>Fixed a few bugs in poisition(). </li>
                    <li>Added BackupSystemTask: running the backup as a system task guarantees a consistent backup.</li>
                    <li>Added XQuery function that can be used to trigger arbitrary system tasks.</li>
                    <li>Backup can now write to a .zip file instead of the file system. </li>
                    <li>Interactice client: Added Bokmål translation by Trond Albinussen</li>
                </ul>
                <p>Started on 4-11-2006 (rev4787)</p>
            </div>
        </atom:content>
        <atom:link xmlns:atom="http://www.w3.org/2005/Atom" type="blog" href="/db/apps/wiki/data/blogs/dizzzz"/>
    </entry>
</feed>