Hi,
I'm trying to migrate a project from 8.2.2 to 8.5.1. I'm this getting errors on all "declare option db:chop 'no';":
[bxerr:BASX0010] Database option not allowed in library module: chop.
Does it mean that I no longer need these to keep my spaces intact or is it a bug? I didn't find anything in the doc that mention this option being removed. I'm still finding the option in the doc with 'false' instead of 'no' at http://docs.basex.org/wiki/XQuery_Extensions%E2%80%8B, and with 'no' at: http://docs.basex.org/wiki/XSLT_Module.
I tried changing 'no' to 'false', but it seems that the issue is with the option itself, not with the value.
Hi France,
[bxerr:BASX0010] Database option not allowed in library module: chop.
As the error message says, database options cannot be set anymore in library modules, only in main modules. The reason is that the options were also affecting other modules, because database options can only be set globally in the query context.
Generally, it’s advisable to use database options locally. Do you know which parts of your module were affected by the option?
Cheers Christian
Does it mean that I no longer need these to keep my spaces intact or is it a bug? I didn't find anything in the doc that mention this option being removed. I'm still finding the option in the doc with 'false' instead of 'no' at http://docs.basex.org/wiki/XQuery_Extensions, and with 'no' at: http://docs.basex.org/wiki/XSLT_Module.
I tried changing 'no' to 'false', but it seems that the issue is with the option itself, not with the value.
-- France Baril Architecte documentaire / Documentation architect france.baril@architextus.com
I do want the option to affect all modules. I handle mixed content. Space removal affects the integrity of my content.
I remember having a lot of problems with that at first. Most of my modules apply changes to content. I have very few read only modules, and from what I remember, even adding an attribute to an element would mess up the content. I have become obsessive with the chop no option.
Obsessed or not, I've commented them out just to run a few tests and see if I can still keep my content intact, but now I'm having issues with:
[bxerr:BASX0003] Unknown serialization parameter "method".
It looks like I'm in for a lot of refactoring before I can test how much the chop option is necessary. Is there a page that explains these new changes, and also how to work with the different types of modules, kind of a quick Best Practices reference. I've been using .xqm exclusively so far. I thought they were necessary to handle the restxq calls. Also, if I don't specify the output method, the .js doesn't know what to do with the result. All in all, it seems like my old practices won't work in the future, but I'm not sure how to tackle this. Some guidance, maybe as a quick example would be welcomed.
Thanks
On Wed, Jul 20, 2016 at 1:46 PM, Christian Grün christian.gruen@gmail.com wrote:
Hi France,
[bxerr:BASX0010] Database option not allowed in library module: chop.
As the error message says, database options cannot be set anymore in library modules, only in main modules. The reason is that the options were also affecting other modules, because database options can only be set globally in the query context.
Generally, it’s advisable to use database options locally. Do you know which parts of your module were affected by the option?
Cheers Christian
Does it mean that I no longer need these to keep my spaces intact or is
it a
bug? I didn't find anything in the doc that mention this option being removed. I'm still finding the option in the doc with 'false' instead of 'no' at http://docs.basex.org/wiki/XQuery_Extensions, and with 'no' at: http://docs.basex.org/wiki/XSLT_Module.
I tried changing 'no' to 'false', but it seems that the issue is with the option itself, not with the value.
-- France Baril Architecte documentaire / Documentation architect france.baril@architextus.com
I do want the option to affect all modules.
In that case, I recommend you to put the option in the main module you are calling. You can also set it in your .basex or web.xml configuration files.
[bxerr:BASX0003] Unknown serialization parameter "method".
I’ll probably need more details on that error. What is the function that’s triggering it?
Is there a page that explains these new changes, and also how to work with the different types of modules, kind of a quick Best Practices reference.
Yet to be written (no time left…).
I've been using .xqm exclusively so far. I thought they were necessary to handle the restxq calls.
You can also use main modules [1].
Hope this helps Christian
I haven't been following up with all the changes. I just saw this from 7.7:
Updated: RESTXQ function may now also be specified in main modules (suffix:
*.xq).
I think I can work with all *.xq then. I'll let you know how it goes.
Ok, I'm getting the error even with .xq.
The error is :
Stopped at /Applications/Holismo/webapp/c-classes.xq, 5/28:
[bxerr:BASX0010] Database option not allowed in library module: chop.
The file is attached. I turned it into a .xq because it has a function that modifies content and even changes on attributes have caused issues with spacing in the past.
Maybe I'm not allowed to define a namespace on a main module, and therefore it's read as a library module?
On Wed, Jul 20, 2016 at 3:16 PM, France Baril france.baril@architextus.com wrote:
I haven't been following up with all the changes. I just saw this from 7.7:
Updated: RESTXQ function may now also be specified in main modules
(suffix: *.xq).
I think I can work with all *.xq then. I'll let you know how it goes.
Ok, I'm getting the error even with .xq.
It’s still a library module. I have added a paragraph in our Wiki that shows the difference between main and library modules, and that explains which suffixes are detected as XQuery files in BaseX [1]. I have also revised the RESTXQ preliminaries, because the old version was a bit fuzzy [2].
Best, Christian
[1] http://docs.basex.org/wiki/XQuery_Extensions#Suffixes [2] http://docs.basex.org/wiki/RESTXQ#Preliminaries
On Wed, Jul 20, 2016 at 3:16 PM, France Baril france.baril@architextus.com wrote:
I haven't been following up with all the changes. I just saw this from 7.7:
Updated: RESTXQ function may now also be specified in main modules (suffix: *.xq).
I think I can work with all *.xq then. I'll let you know how it goes.
-- France Baril Architecte documentaire / Documentation architect france.baril@architextus.com
Getting rid of modules just to be able to handle mixed content seems like the wrong reason to refactor all my code.
I'll have to rename almost everything since most modules have most of their functions using the same names: get, set, transform, etc...
I'm not convinced that this is the way to go for me. There is a bug in 8.2.2 that I can no longer live with, I'll try upgrading to some in-between version for now. Can you tell me which version introduced the inability to set db:chop in modules?
Can you tell me which version introduced the inability to set db:chop in modules?
It might have been version 8.4. – Following your thoughts, I assume that setting CHOP globally in the configuration file is no option for you?
In all my projects and client projects, setting chop in the config would work.
Can I set CHOP = false in .basex, stop using 'declare option db:chop' in all my modules and be certain that spaces are not messed with?
Can I set CHOP = false in .basex, stop using 'declare option db:chop' in all my modules and be certain that spaces are not messed with?
Ditto. If you are working in the HTTP context, don’t forget the web.xml file.
Yes, web.xml is set! Awesome, I'm trying 8.5.1 again. Thanks!
On Thu, Jul 21, 2016 at 1:25 PM, Christian Grün christian.gruen@gmail.com wrote:
Can I set CHOP = false in .basex, stop using 'declare option db:chop' in
all
my modules and be certain that spaces are not messed with?
Ditto. If you are working in the HTTP context, don’t forget the web.xml file.
basex-talk@mailman.uni-konstanz.de