fn:unparsed-text fails in command line XQuery
Hello list, I have a file some.xml containing <xml>hello world!</xml> and I can read it in BaseX code like this: java org.basex.BaseX "declare namespace fn='http://www.w3.org/2005/xpath-functions';fn:doc('some.xml')" However I cannot use fn:unparsed-text() from a command line, when a namespace declaration with a protocol is present. I have tried to do java org.basex.BaseX "declare namespace fn='http://www.w3.org/2005/xpath-functions';fn:unparsed-text('some.xml')" but I keep getting this: Stopped at ., 1/79: [FOUT1170] Static Base URI is undefined. This is strange, because the command works fine without the namespace declaration: java org.basex.BaseX "unparsed-text('some.xml')" What can I do to use both namespace declarations and fn:unparsed-text from within a single command line? Best regards Gunther
Dear Gunther, Thanks for the finding. This command-line specific bug has just been fixed [1]. BaseX 8.6 will be released this or next week. All the best, Christian [1] http://files.basex.org/releases/latest/ On Thu, Jan 19, 2017 at 11:20 PM, Gunther Rademacher <grd@gmx.net> wrote:
Hello list,
I have a file some.xml containing
<xml>hello world!</xml>
and I can read it in BaseX code like this:
java org.basex.BaseX "declare namespace fn='http://www.w3.org/2005/xpath-functions';fn:doc('some.xml')"
However I cannot use fn:unparsed-text() from a command line, when a namespace declaration with a protocol is present. I have tried to do
java org.basex.BaseX "declare namespace fn='http://www.w3.org/2005/xpath-functions';fn:unparsed-text('some.xml')"
but I keep getting this:
Stopped at ., 1/79: [FOUT1170] Static Base URI is undefined.
This is strange, because the command works fine without the namespace declaration:
java org.basex.BaseX "unparsed-text('some.xml')"
What can I do to use both namespace declarations and fn:unparsed-text from within a single command line?
Best regards Gunther
Hi Christian, thank you for the quick fix! It now works fine with "latest". Best regards Gunther
Gesendet: Freitag, 20. Januar 2017 um 09:50 Uhr Von: "Christian Grün" <christian.gruen@gmail.com> An: "Gunther Rademacher" <grd@gmx.net> Cc: BaseX <basex-talk@mailman.uni-konstanz.de> Betreff: Re: [basex-talk] fn:unparsed-text fails in command line XQuery
Dear Gunther,
Thanks for the finding. This command-line specific bug has just been fixed [1]. BaseX 8.6 will be released this or next week.
All the best, Christian
[1] http://files.basex.org/releases/latest/
On Thu, Jan 19, 2017 at 11:20 PM, Gunther Rademacher <grd@gmx.net> wrote:
Hello list,
I have a file some.xml containing
<xml>hello world!</xml>
and I can read it in BaseX code like this:
java org.basex.BaseX "declare namespace fn='http://www.w3.org/2005/xpath-functions';fn:doc('some.xml')"
However I cannot use fn:unparsed-text() from a command line, when a namespace declaration with a protocol is present. I have tried to do
java org.basex.BaseX "declare namespace fn='http://www.w3.org/2005/xpath-functions';fn:unparsed-text('some.xml')"
but I keep getting this:
Stopped at ., 1/79: [FOUT1170] Static Base URI is undefined.
This is strange, because the command works fine without the namespace declaration:
java org.basex.BaseX "unparsed-text('some.xml')"
What can I do to use both namespace declarations and fn:unparsed-text from within a single command line?
Best regards Gunther
participants (2)
-
Christian Grün -
Gunther Rademacher