Dear BaseX team, I face unexpected problem when trying to switch off xinclude processing. From the documentation I understand that what I have to do is set the option XINCLUDE to the value "false". But how?
Attempt #1========= I added to the config file .basex the line: XINCLUDE = false Result: no effect, and these messages: C:/Program Files (x86)/BaseX/.basex: Unknown option 'XINCLUDE'. C:/Program Files (x86)/BaseX/.basex: writing new configuration file. Did I misunderstand the documentation?
Attempt #2======== I inserted into the query this initial line:declare option db:XINCLUDE 'false'; Result: Program crash with this message:[FODC0002] "file:///C:/projects/otds/otds-config/h.xml" (Line 1): Vorzeitiges Dateiende. where the named file (h.xml) is the output (!) file specified either like this:basex foo.xq > h.xmlor like this:basex -o h.xml foo.xq Note. Using neither > ... nor -o ..., I do get the correct output, written to stdout. But I must capture it, and the capturing fails! Attempt #3======== Patching the basex.bat file, inserting option -D: java -Dorg.basex.XINCLUDE=false -cp "%CP%" %BASEX_JVM% org.basex.BaseX %* Result:Same as attempt #2 So I'm at a loss. I need to switch off xinclude because my input files use xinclude in combination with xpointer attributes, like this: <xi:include href="../../../globals/notifications.xml" xpointer="xpointer(/config/*)" parse="xml" /> Applying doc(...) to such a file, yields this result: [FODC0002] "file:///C:/projects/otds/otds-config/branches/path/to/bar.xml" (Line 11): "include" mit href "../../../globals/notifications.xml" nicht erfolgreich, und es wurde kein "fallback"-Element gefunden.
Can you help me? Hans-Jürgen PS: Using version:BaseX 8.3 beta 474994c [Standalone]
Hi Hans-Jürgen,
Attempt #1
I added to the config file .basex the line: XINCLUDE = false
XINCLUDE is a local option. Did you specify it below the "# Local Options" comment? If yes, I am pretty you are using an older version of BaseX.
Attempt #2
I inserted into the query this initial line: declare option db:XINCLUDE 'false';
How does your full query look like?
With the latest snapshot, it should also be possible to specify 'xinclude' with functions like fetch:xml or db:add:
fetch:xml('input.xml', map { 'xinclude': false() })
Hope this helps, Christian
[1] http://files.basex.org/releases/latest/
So I'm at a loss. I need to switch off xinclude because my input files use xinclude in combination with xpointer attributes, like this:
<xi:include href="../../../globals/notifications.xml" xpointer="xpointer(/config/*)" parse="xml" />
Applying doc(...) to such a file, yields this result:
[FODC0002] "file:///C:/projects/otds/otds-config/branches/path/to/bar.xml" (Line 11): "include" mit href "../../../globals/notifications.xml" nicht erfolgreich, und es wurde kein "fallback"-Element gefunden.
Can you help me?
Hans-Jürgen
PS: Using version: BaseX 8.3 beta 474994c [Standalone]
Thanks a lot, Christian - shifting the option assignment in the config file below the line "#Local Options" does the job. Hurrah!
From what you write I conclude that being local or global is an inherent quality of each option, rather than the scope of a value assignment, as I had thought. And so it depends on this quality where to place the assignment to a given option within .basex - for some options it is above, for some options its is below "# Local Options". If this is not correct, please let me know.
Concerning attempts #2 and #3 - that was my mistake. I tried to capture into a file with the extension .xml, which was accordingly initialized to an empty file, which was then found by file:list and to which subsequently doc(...) was applied, of course producing an error.
Kind regards,Hans-Jürgen PS: Here the full query, as requested:
Christian Grün christian.gruen@gmail.com schrieb am 19:23 Montag, 4.Januar 2016:
Hi Hans-Jürgen,
Attempt #1
I added to the config file .basex the line: XINCLUDE = false
XINCLUDE is a local option. Did you specify it below the "# Local Options" comment? If yes, I am pretty you are using an older version of BaseX.
Attempt #2
I inserted into the query this initial line: declare option db:XINCLUDE 'false';
How does your full query look like?
With the latest snapshot, it should also be possible to specify 'xinclude' with functions like fetch:xml or db:add:
fetch:xml('input.xml', map { 'xinclude': false() })
Hope this helps, Christian
[1] http://files.basex.org/releases/latest/
So I'm at a loss. I need to switch off xinclude because my input files use xinclude in combination with xpointer attributes, like this:
<xi:include href="../../../globals/notifications.xml" xpointer="xpointer(/config/*)" parse="xml" />
Applying doc(...) to such a file, yields this result:
[FODC0002] "file:///C:/projects/otds/otds-config/branches/path/to/bar.xml" (Line 11): "include" mit href "../../../globals/notifications.xml" nicht erfolgreich, und es wurde kein "fallback"-Element gefunden.
Can you help me?
Hans-Jürgen
PS: Using version: BaseX 8.3 beta 474994c [Standalone]
basex-talk@mailman.uni-konstanz.de