[MarkLogic Dev General] JSTL and XQuery
Mark Helmstetter
Mark.Helmstetter at marklogic.com
Wed May 7 06:41:34 PDT 2008
That won't work. The Mark Logic JSP Tag Library will only work with
MarkLogic Server.
I'm not sure what your ultimate goal is here, but really the solution is
quite simple -- use MarkLogic Server as your XML database. :-)
> -----Original Message-----
> From: general-bounces at developer.marklogic.com [mailto:general-
> bounces at developer.marklogic.com] On Behalf Of Neil Swainston
> Sent: Wednesday, May 07, 2008 9:11 AM
> To: general at developer.marklogic.com
> Subject: [MarkLogic Dev General] JSTL and XQuery
>
> Hi all,
>
> I'm having problems using the JSTL library for querying an XML database.
> In
> this case, exist.
>
> The JSP that I have developed is as follows:
>
> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
>
> <%@ taglib prefix="x" uri="http://java.sun.com/jsp/jstl/xml" %>
>
> <%@ taglib prefix="xq" uri="http://marklogic.com/jsp/taglib" %>
>
> <xq:setDataSource host="localhost" port="8080" user="admin"
> password="***"/>
>
> <xq:execute var="xml">
>
> <xq:query>
>
> declare namespace p="http://www.sbml.org/sbml/level2";
>
> <allResults>
>
> {
>
> for $t in document() return
>
> <result>
>
> {
>
>
> ($t//p:model/@name,count($t//p:model/p:listOfCompartments/p:compartment),c
> ou
> nt($t//p:model/p:listOfSpecies/p:species),count($t//p:model/p:listOfReacti
> on
> s/p:reaction))
>
> }
>
> </result>
>
> }
>
> </allResults>
>
> </xq:query>
>
> </xq:execute>
>
> <c:import var="xsl" url="${param.application}/browseDocument.xsl"/>
>
> <x:transform xslt="${xsl}" doc="${xml}"/>
>
> Effectively, I attempting to query my exist database that is running on
> port
> 8080.
>
> When I use the same query in the exist sandbox, all works fine. The error
> that I am receiving is as follows:
>
> javax.servlet.jsp.JspException: executing query:
> com.marklogic.xqrunner.XQException: Query evaluation request rejected
> (400,
> Bad Request). Is this an XDBC server?
>
>
>
> Neil Swainston
>
> Experimental Officer
>
> Manchester Centre for Integrative Systems Biology
>
> Manchester Interdisciplinary Biocentre
>
> University of Manchester
>
> Manchester M1 7DN
>
> United Kingdom
>
>
> _______________________________________________
> General mailing list
> General at developer.marklogic.com
> http://xqzone.com/mailman/listinfo/general
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3104 bytes
Desc: not available
Url : http://xqzone.marklogic.com/pipermail/general/attachments/20080507/430cc547/smime.bin
More information about the General
mailing list