Re: [basex-talk] standalone vs GUI character parsing

2016-10-27 Thread Christian Grün
Hi George,

> how can a basexclient execute  XQUERY
> "import module namespace test = "test" at "test.xq" if there isn't a
> querypath to define the directory for the modules?

One way is to specify the base URI in your query [1]. If you
frequently import server-side modules, the approach we recommend is to
move the modules into the repository.

Hope this helps,
Christian

[1] https://www.w3.org/TR/xquery-31/#id-base-uri-decl
[2] http://docs.basex.org/wiki/Repository


Re: [basex-talk] standalone vs GUI character parsing

2016-10-27 Thread George Sofianos

I pass this on to the Docker aficionados on the list…

Christian


Thanks and sorry for responding on a month old post about the xml 
parser, I just noticed my email filters were not working.


About the QUERYPATH, I think the issue isn't specifically about docker. 
Maybe I'm missing something, but how can a basexclient execute  XQUERY 
"import module namespace test = "test" at "test.xq" if there isn't a 
querypath to define the directory for the modules? I'm trying this on a 
local server instance and it searches for the test.xq in the BaseX bin 
directory. I hope there is an alternative way to declare the path, 
because I won't be able to use BaseX any more from my java application, 
using the BasexClient query method.


Specifically about Docker, the older images can't run because of the .m2 
permissions, and the latest one is missing QUERYPATH.


Re: [basex-talk] standalone vs GUI character parsing

2016-10-27 Thread Christian Grün
> What about characters that outside the UTF-8 scope?

That’s a difficult one. You may end up parsing silly stuff once you
tolerate wrongly encoded characters. If there is no chance to get your
input cleaned before sending it to BaseX, Tagsoup may be the last
resort.

> I also noticed that the QUERYPATH has been removed from latest builds, how
> can I set the Docker image to find xq modules? I was using the QUERYPATH to 
> map them.

I pass this on to the Docker aficionados on the list…

Christian


Re: [basex-talk] standalone vs GUI character parsing

2016-10-27 Thread George Sofianos
What about characters that outside the UTF-8 scope? I think that still 
makes the internal parser to fail. I thought that was intended behaviour 
so I never mentioned it.


On 09/30/2016 03:10 PM, Christian Grün wrote:

By default, XML documents with invalid characters should be rejected;
but if you turn on the internal parser in the parsing tab of the
Database Creation dialog, all invalid characters will be replaced with
FFFD. Maybe that’s what you have done?

I also noticed that the QUERYPATH has been removed from latest builds, 
how can I set the Docker image to find xq modules? I was using the 
QUERYPATH to map them.


Re: [basex-talk] standalone vs GUI character parsing

2016-09-30 Thread Bridger Dyson-Smith
Hil Christian,

On Fri, Sep 30, 2016 at 8:10 AM, Christian Grün 
wrote:

> Hi Bridger,
>
> Sorry for letting you wait.
>

No trouble at all.

>
> > I'm able to create a database with the GUI from an XML document that
> > contains an invalid character (U+) -- I guess BaseX does some
> character
> > scrubbing, which is awesome :).
>
> By default, XML documents with invalid characters should be rejected;
> but if you turn on the internal parser in the parsing tab of the
> Database Creation dialog, all invalid characters will be replaced with
> FFFD. Maybe that’s what you have done?
>
>
That's exactly what I've done! :) I've habitually used the internal parser
and didn't realize that I needed to add it as an option.


> > Here are my commands in standalone mode:
> > BaseX 8.5.3 [Standalone]
> > Try 'help' to get more information.
> >> create db test-bad-char /usr/home/bridger/src/another-test.xml
>
> This should work:
>
> > SET INTPARSE on
> > CREATE DB ...
>
> I have slightly extended our Wiki entry for the INTPARSE option [1];
> hope this helps,
> Christian
>
>
Absolutely yes.
Thank you kindly.
Best,
Bridger


> [1] http://docs.basex.org/wiki/Options#INTPARSE
>


Re: [basex-talk] standalone vs GUI character parsing

2016-09-30 Thread Christian Grün
Hi Bridger,

Sorry for letting you wait.

> I'm able to create a database with the GUI from an XML document that
> contains an invalid character (U+) -- I guess BaseX does some character
> scrubbing, which is awesome :).

By default, XML documents with invalid characters should be rejected;
but if you turn on the internal parser in the parsing tab of the
Database Creation dialog, all invalid characters will be replaced with
FFFD. Maybe that’s what you have done?

> Here are my commands in standalone mode:
> BaseX 8.5.3 [Standalone]
> Try 'help' to get more information.
>> create db test-bad-char /usr/home/bridger/src/another-test.xml

This should work:

> SET INTPARSE on
> CREATE DB ...

I have slightly extended our Wiki entry for the INTPARSE option [1];
hope this helps,
Christian

[1] http://docs.basex.org/wiki/Options#INTPARSE