Dimitre, thanks for the bug fix, for which I’ve created an entry in our bug tracker [1]. Best, Christian [1] https://github.com/BaseXdb/basex/issues/744 ___________________________ 2013/8/11 Dimitre Novatchev <dnovatchev@gmail.com>:
Hi,
Given this XML document (in file example.xml):
<p xmlns="http://example.com/one" xml:lang="de" author="Friedrich von Schiller"> Freude, schöner Götterfunken,<br/> Tochter aus Elysium,<br/> Wir betreten feuertrunken,<br/> Himmlische, dein Heiligtum.</p>
This XQuery expression (in file TesQNametExpression.xquery, in the same directory):
let $doc := doc('example.xml') return
string-length($doc/Q{http://example.com/one}p[1]/@Q{http://www.w3.org/XML/1998/namespace}lang)
produces:
0
However the correct result (which I get with Saxon 9.5.01) is:
1
Here is the "Query Info" from the BaseX UI:
Compiling: - pre-evaluating fn:doc("example.xml") - binding static variable $doc - removing unknown element/attribute Q{http://example.com/one}p - pre-evaluating fn:string-length(()) - removing variable $doc - simplifying flwor expression Query: let $doc := doc('example.xml') return string-length($doc/Q{http://example.com/one}p[1]/@Q{http://www.w3.org/XML/1998/namespace}lang) Optimized Query: 0
Hope that this information would be useful for identifying and fixing the issue.
-- Cheers, Dimitre Novatchev --------------------------------------- Truly great madness cannot be achieved without significant intelligence. --------------------------------------- To invent, you need a good imagination and a pile of junk ------------------------------------- Never fight an inanimate object ------------------------------------- To avoid situations in which you might make mistakes may be the biggest mistake of all ------------------------------------ Quality means doing it right when no one is looking. ------------------------------------- You've achieved success in your field when you don't know whether what you're doing is work or play ------------------------------------- Facts do not cease to exist because they are ignored. ------------------------------------- Typing monkeys will write all Shakespeare's works in 200yrs.Will they write all patents, too? :) ------------------------------------- I finally figured out the only reason to be alive is to enjoy it.
_______________________________________________ BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk