importing library with alternative namespace
Friday, 24 February 2012 · 2 messages
JC
Jan Vlčinský (CAD)24 Feb 2012 12:54 #
Hi
I am really happy to see an option to import xquery library - it shall let me organize my code much better.
When testing sample from wiki: http://docs.basex.org/wiki/Packaging
I tried to modify proposed instruction:
import module namespace functx="http://www.functx.com";
into this, using alternative namespace:
import module namespace functxyz="http://www.functx.com";
The import worked well, but when calling
functxyz:capitalize-first("test")I got result: Error: [FONS0004] No namespace declared for prefix 'functx'.
Questions: Is this ok, that I am forced to use assigned namespace, or is this just some bug in the library I have teested? Or bug in BaseX?
With best regards
Jan
*Ing. Jan Vlčinský*
TamTam Research s.r.o.
Slunečnicová 338/3, 734 01 Karviná Ráj, Czech Republic
tel: +420-597 602 024; mob: +420-608 979 040
skype: janvlcinsky; GoogleTalk: jan.vlcinsky at gmail.com
http://cz.linkedin.com/in/vlcinsky
CG
Christian Grün24 Feb 2012 12:59 #
Dear Jan,
Quoted text · Jan Vlčinský (CAD) · 3 lines
> The import worked well, but when calling > functxyz:capitalize-first("test") > I got result: Error: [FONS0004] No namespace declared for prefix 'functx'.
that's probably related to sth. listed in the following GitHub issue..
https://github.com/BaseXdb/basex/issues/133
..which is now the oldest entry in our list. a strong indicator this should be addressed soon..
Thanks or asking,
Christian
Written for BaseX 7.1. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery