On 27/12/2013, e-letter <inp...@gmail.com> wrote:
> declare
> %rest:path("/form")
> %rest:GET
> function page:post()
>       {
>               let $x :=
> fn:doc("xmldatabasefile.xml")/bookstore/book/title[contains(text(),'Everyday
> Italian')]/parent::*
>               return $x
>       };
...

was changed to:

declare
%rest:GET
%rest:path(./xmldatabasefile.xml/bookstore/book)
function book:bookstore() as element(bookstore) {
        <bookstore>
                {
                        let $x := 
fn:doc("xmldatabasefile.xml")/bookstore/book/title[contains(text(),'Everyday
Italian')]/parent::*
                                return $x
                }
        </bookstore>
        };

The server result:

HTTP ERROR 500

Problem accessing /. Reason:
    Unexpected error: Improper use? Potential bug? Your feedback is welcome:
Contact: basex-talk@mailman.uni-konstanz.de
Version: BaseX 7.7.2
Java: Sun Microsystems Inc., 1.6.0_24
OS: Linux, i386
Stack Trace:
java.lang.NumberFormatException
        at java.math.BigDecimal.<init>(BigDecimal.java:516)
        at java.math.BigDecimal.<init>(BigDecimal.java:739)
        at org.basex.query.value.item.Dec.<init>(Dec.java:35)
        at org.basex.query.QueryParser.numericLiteral(QueryParser.java:2200)
        at org.basex.query.QueryParser.literal(QueryParser.java:2173)
        at org.basex.query.QueryParser.annotation(QueryParser.java:475)
        at org.basex.query.QueryParser.prolog2(QueryParser.java:423)
        at org.basex.query.QueryParser.parseLibrary(QueryParser.java:247)
        at org.basex.query.QueryContext.parseLibrary(QueryContext.java:194)
        at org.basex.http.restxq.RestXqModule.parseModule(RestXqModule.java:130)
        at org.basex.http.restxq.RestXqModule.parse(RestXqModule.java:51)
        at org.basex.http.restxq.RestXqModules.cache(RestXqModules.java:137)
        at org.basex.http.restxq.RestXqModules.cache(RestXqModules.java:104)
        at org.basex.http.restxq.RestXqModules.find(RestXqModules.java:59)
        at org.basex.http.restxq.RestXqServlet.run(RestXqServlet.java:27)
        at org.basex.http.BaseXServlet.service(BaseXServlet.java:58)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
        at 
org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)
        at 
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:457)
        at 
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
        at 
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
        at 
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
        at 
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075)
        at 
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384)
        at 
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
        at 
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009)
        at 
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
        at 
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
        at org.eclipse.jetty.server.Server.handle(Server.java:370)
        at 
org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
        at 
org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:949)
        at 
org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1011)
        at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:644)
        at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
        at 
org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
        at 
org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:668)
        at 
org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
        at 
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
        at 
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
        at java.lang.Thread.run(Thread.java:679)

Powered by Jetty://
_______________________________________________
BaseX-Talk mailing list
BaseX-Talk@mailman.uni-konstanz.de
https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk

Reply via email to