You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by Leo <le...@tstt.net.tt> on 2003/08/11 16:30:58 UTC
Re: Error: When accessing XSP page (Namespace forprefix 'xmldb' has not been declared)
Hi
See full text of simple1.xsp
<?xml version="1.0"?>
<xsp:page xmlns:xsp="http://apache.org/xsp"
xmlns:xmldb="http://exist-db.org/xmldb/1.0"
>
<document>
<body>
<section title="View document">
<p>This is a simple logicsheet-example, which retrieves the
specified
document from collection /db/shakespeare/plays and
inserts it below.</p>
<form action="simple1.xsp" method="GET">
<input type="text" name="doc" size="30"
value="hamlet.xml"/>
<input type="submit"/>
</form>
<xsp:logic>
String doc = request.getParameter("doc");
if(doc != null && doc.length() > 0)
<p>Retrieving document
<xsp:expr>doc</xsp:expr></p>
<xmldb:collection
uri="xmldb:exist:///db/shakespeare/plays"
user="guest" password="guest">
<xml-source>
<xmldb:get-document
encoding="ISO-8859-1" as="xml">
<xmldb:name>doc</xmldb:name>
</xmldb:get-document>
</xml-source>
</xmldb:collection>
}
</xsp:logic>
</section>
</body>
</document>
</xsp:page>
Regards
Leo