fn:unparsed-text fails in command line XQuery

Thursday, 19 January 2017 · 3 messages · last reply 20 Jan 2017
GR
Gunther Rademacher19 Jan 2017 23:20 #
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
CG
Christian Grün20 Jan 2017 09:50 #
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/
Quoted text · Gunther Rademacher · 33 lines
On Thu, Jan 19, 2017 at 11:20 PM, Gunther Rademacher <grd at 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
GR
Gunther Rademacher20 Jan 2017 09:58 #
Hi Christian, thank you for the quick fix! It now works fine with "latest". Best regards Gunther
Quoted text · Christian Grün · 52 lines
> Gesendet: Freitag, 20. Januar 2017 um 09:50 Uhr > Von: "Christian Grün" <christian.gruen at gmail.com> > An: "Gunther Rademacher" <grd at gmx.net> > Cc: BaseX <basex-talk at 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 at 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 >

⚡Generated with XQuery