Support for DB XML 2

This commit is contained in:
sebd 2005-05-09 15:12:23 +00:00
parent 838cd439e8
commit 6763e08121
2 changed files with 21 additions and 52 deletions

View File

@ -1,33 +1,15 @@
<?xml version="1.0"?>
<configuration xmlns="http://www.entrouvert.org/namespaces/expression/0.0">
<siteXsltFilePath>vhosts/system/xslt/site.xsl</siteXsltFilePath>
<logFilePath>/var/log/expression.log</logFilePath>
<pidFilePath>expression.pid</pidFilePath>
<adminEmail>webmaster@localhost</adminEmail>
<!--
<user>www-data</user>
<group>www-data</group>
-->
<item name="css" src="/usr/local/share/expression/css"/>
<item name="descriptions" src="/usr/local/share/expression/descriptions"/>
<item name="images" src="/usr/local/share/expression/images"/>
<item name="javascript" src="/usr/local/share/expression/javascript"/>
<item name="schemas" src="/usr/local/share/expression/schemas"/>
<item name="xslt" src="/usr/local/share/expression/xslt"/>
<module name="expression.modules.dbxmlcontainers"/>
<module name="expression.modules.groups"/>
<defaultMode>index list</defaultMode>
<module name="expression.modules.dbxmldatabases">
<environment dbHome="db"/>
<container name="test.dbxml"/>
<container name="test2.dbxml"/>
</module>
<virtualHost>
<documentRoot>vhosts/dbxmltest/</documentRoot>
<port>1997</port>
<serverName>localhost</serverName>
<title>DBXML Test</title>
<documentRoot>vhosts/dbxmltest/</documentRoot>
<talkback/>
<title>DBXML Test Site</title>
</virtualHost>
</configuration>

View File

@ -8,45 +8,32 @@
<body>
<h1>Expression DB XML Test Suite</h1>
<h2>Pre-requisites</h2>
<p>File dbxml.py must be installed.
<p>Package libdbxml-python must be installed for this to work.
<a href="http://www.lesdeveloppementsdurables.org/debian">Unofficial Debian packages</a> are available.
You can add <tt>deb http://www.lesdeveloppementsdurables.org/debian /</tt> to your source.list.</p>
<p>You must have a sample test.dbxml file in this directory.
<p>You must have the sample test.dbxml file in the dbHome directory (dbHome is defined in config-dbxmltest.xml)
<a href="create_test_dbxml.py">create_test_dbxml.py</a> can create it for you.</p>
<h2>Tests</h2>
<ul>
<li><a href="test.dbxml">test.dbxml</a> lists the container's contents.</li>
<li><a href="test.dbxml/1">test.dbxml/1</a> displays document 1 contents (nothing, see explanations below).</li>
<li><a href="test.dbxml/3">test.dbxml/3</a> displays document 4 (an article => rendered as an article).</li>
<li><a href="test.dbxml/3/edit">test.dbxml/3/edit</a>
<li><a href="db/test.dbxml">db/test.dbxml</a>o
lists the container's contents.</li>
<li><a href="db/test.dbxml/oui oui">db/test.dbxml/oui oui</a>
displays document "oui oui" contents (see html source code).</li>
<li><a href="db/test.dbxml/article2">db/test.dbxml/article2</a>
displays document article2 (an article =&gt; rendered as an article).</li>
<li><a href="db/test.dbxml/article2/edit">db/test.dbxml/article2/edit</a>
to edit the article in place.</li>
<li><a href="test.dbxml/new-yep-article">test.dbxml/new-yep-article</a>
<li><a href="db/test.dbxml/new-yep-article">db/test.dbxml/new-yep-article</a>
displays an article creation form.
The article is then stored in the container.</li>
<li><a href="test.dbxml/docSelect/%2F%2Ftitle">test.dbxml/docSelect/%2F%2Ftitle</a>
<li><a href="db/test.dbxml/docSelect/%2F%2Ftitle">db/test.dbxml/docSelect/%2F%2Ftitle</a>
lists all <i>documents</i> that match xpath expression "//title".</li>
<li><a href="test.dbxml/docSelect/%2F%2Fyep%3Atitle">test.dbxml/docSelect/%2F%2Fyep%3Atitle</a>
<li><a href="db/test.dbxml/docSelect/%2F%2Fyep%3Atitle">db/test.dbxml/docSelect/%2F%2Fyep%3Atitle</a>
lists all <i>documents</i> that match xpath expression "//yep:title".</li>
<li><a href="test.dbxml/nodeSelect/%2F%2Ftitle">test.dbxml/nodeSelect/%2F%2Ftitle</a>
<li><a href="db/test.dbxml/nodeSelect/%2F%2Ftitle">db/test.dbxml/nodeSelect/%2F%2Ftitle</a>
lists all <i>nodes</i> that match xpath expression "//title".</li>
<li><a href="test.dbxml/nodeSelect/%2F*">test.dbxml/nodeSelect/%2F*</a>
<li><a href="db/test.dbxml/nodeSelect/%2F*">db/test.dbxml/nodeSelect/%2F*</a>
lists all <i>nodes</i> that match xpath expression "/*".</li>
</ul>
<h2>Observations</h2>
<p>
When displaying arbitrary XML code, Expression used to show them raw.
But currently it skips them (XSLT bug ?).
Therefore you won't see the documents that are not known by Expression
(= no description associated to the element name).
In the default test.dbxml, only articles will show.
Same problem with nodes.
</p>
<p>
However, when you append <em>/unstyled</em> to the URI, you can see the invisible XML code in the generated HTML page source.
</p>
<p>
<em>nodeSelect</em> now displays the "listItem" description page component of known elements, when available.
See xml/misc/description/Article.xml for an example.
</p>
</body>
</html>