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),cou
nt($t//p:model/p:listOfSpecies/p:species),count($t//p:model/p:listOfReaction
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
[email protected]
http://xqzone.com/mailman/listinfo/general

Reply via email to