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%7Dp%5B1%5D/@Q%7Bhttp://www.w3.org/XML/1998/namespace%...)
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%7Dp - 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%7Dp%5B1%5D/@Q%7Bhttp://www.w3.org/XML/1998/namespace%...) Optimized Query: 0
Hope that this information would be useful for identifying and fixing the issue.
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%7Dp%5B1%5D/@Q%7Bhttp://www.w3.org/XML/1998/namespace%...)
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%7Dp
- 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%7Dp%5B1%5D/@Q%7Bhttp://www.w3.org/XML/1998/namespace%...) 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
Hi Dimitre,
the bug you encountered has now been fixed [1]; feel free to check out the latest stable snapshot [2] (7.7.1 will be released soon).
Best, Christian
[1] https://github.com/BaseXdb/basex/issues/744 [2] files.basex.org/releases/latest
___________________________
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%7Dp%5B1%5D/@Q%7Bhttp://www.w3.org/XML/1998/namespace%...)
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%7Dp
- 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%7Dp%5B1%5D/@Q%7Bhttp://www.w3.org/XML/1998/namespace%...) 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
basex-talk@mailman.uni-konstanz.de