Hello:

I'm using MonetDB for a project. I've observed some weird results when doing a XQuery on an inserted document.

Steps to reproduce the bug are:

xquery>pf:add-doc ('file://var/tmp/pres-rules.xml', 'pres-rules.xml', 'pres-rules', 1)
more>xquery>declare namespace xs="http://www.w3.org/2001/XMLSchema";
more>declare namespace cr="urn:ietf:params:xml:ns:common-policy";
more>declare namespace pr="urn:ietf:params:xml:ns:pres-rules";
more>count (doc('pres-rules.xml')/cr:ruleset/cr:rule[@id="pres_whitelist"]/cr:conditions/cr:identity)
more><?xml version="1.0" encoding="utf-8"?>
<XQueryResult>0</XQueryResult>

However, sometimes, if I restart the Mserver, the same query returns:

more>xquery>declare namespace xs="http://www.w3.org/2001/XMLSchema";
more>declare namespace cr="urn:ietf:params:xml:ns:common-policy";
more>declare namespace pr="urn:ietf:params:xml:ns:pres-rules";
more>count (doc('pres-rules.xml')/cr:ruleset/cr:rule[@id="pres_whitelist"]/cr:conditions/cr:identity)
more><?xml version="1.0" encoding="utf-8"?>
<XQueryResult>1</XQueryResult>

What is the expected result. I'm sure it's related with namespaces after some tests.

Are you aware of this behaviour? There exists some workaround?

Document to test is attached.

I'm using latest version of MonetDB with XQuery support:

# MonetDB Server v4.34.4
# based on GDK   v1.34.4
# Copyright (c) 1993-July 2008, CWI. All rights reserved.
# Copyright (c) August 2008-2009, MonetDB B.V.. All rights reserved.
# Compiled for x86_64-redhat-linux-gnu/64bit with 64bit OIDs; dynamically linked.
# Detected 0.979 GiB (1051709440 bytes) main-memory.
# Visit http://monetdb.cwi.nl/ for further information.
# PF/Tijah module v0.13.0 loaded. http://dbappl.cs.utwente.nl/pftijah
# MonetDB/XQuery module v0.34.4 loaded (default back-end is 'algebra')
# XRPC administrative console at http://127.0.0.1:50001/admin

Cheers, Nacho.

--
--
Ignacio Martín Oya
Project Engineer
http://www.azetti.com

Important:

This e-mail may contain information confidential to Azetti Networks.

If you are not the intended recipient it may be unlawful for you to
read, copy, distribute, disclose or otherwise use information
contained in it. If this is the case, please contact us immediately
and we will
assist you.

Tel: +34 91 658 69 53
Fax: +34 91 651 40 42
E-mail: Reply to sender