wcandillon/xqlint

Statically declared namespaces

Opened this issue ยท 9 comments

I'm getting a number of namespace errors - XPST0081 - due to the use in eXist of predeclared namespaces.

The W3C spec saysin section 4.13 ๐Ÿ‘Ž

Additional predeclared namespace prefixes may be added to the statically known namespaces by an implementation.

Is there a mechanism whereby I can add these to the linter before execution?

For the moment I'm putting them in by hand. I think this will not cause problems, but I'd rather not do this.

Hi @JonathanRowell !

If you are using gulp to run XQLint, we already support this capability.
If you are using grunt, I could add an option where you can specify the namespace list in the task or maybe introduce a .xqlintrc file.

Last year I yeoman'd my apps and that automatically created grunt files. Since then I bought the book "Automate with Grunt" and have been using it ever since. Someone told me Gulp was easier to use - too late! - I've been using Grunt for almost a year.

A file would probably be most useful. I could stick all the eXist defaults in it and use it in various projects.

+1

@joewiz Would you be interested to tackle this issue? This would require a customization in https://github.com/wcandillon/grunt-xqlint. Are you using grunt as well?

Can you point me to how this is supported in the gulp plugin?

Can you point me to how this is supported in the gulp plugin?

+1 for DotJoshJohnson/vscode-xml
Need a way to ignore default namespaces (xdmp, cts, etc) for MarkLogic

bmix commented

I use xqlint with SublimeLinter (Sublime3 Editor) and my XQuery processor is BaseX. BaseX has a lot of statically bound namespaces. Any chance, to do this outside of grunt/gulp, since I do not think, that that is the way https://github.com/jmeischner/SublimeLinter-contrib-xqlint does it?

I would be happy about .xqlintrc configuration file in addition to pass config via commandline.