csv:doc - interpretation of option values
Dear BaseX people,
a small observation, which might be regarded as a bug (perhaps not).
It is about the interpretation of options passed to function csv:doc. I set the 'header' option like this:
let $options := map{'header': //header/data()}with the confusing result that the option is ignored, although the comparison $options?header eq 'yes'
yields true. If I replace data() with string(),
let $options := map{'header': //header/string()}the option works as expected.
Kind regards, Hans-Jürgen
Hi Hans-Jürgen,
Thanks for the observation. Please check out the latest snapshot [1].
Hope this helps, Christian
Quoted text · Hans-Juergen Rennau · 15 lines
Von: Hans-Juergen Rennau via BaseX-Talk <basex-talk at mailman.uni-konstanz.de> Gesendet: Sonntag, 22. Juni 2025 23:27 An: BaseX <basex-talk at mailman.uni-konstanz.de> Betreff: [basex-talk] csv:doc - interpretation of option values Dear BaseX people, a small observation, which might be regarded as a bug (perhaps not). It is about the interpretation of options passed to function csv:doc. I set the 'header' option like this: let $options := map{'header': //header/data()} with the confusing result that the option is ignored, although the comparison $options?header eq 'yes' yields true. If I replace data() with string(), let $options := map{'header': //header/string()} the option works as expected. Kind regards, Hans-Jürgen
Super, many thanks, Christian!
Best regards, Hans-Jürgen
Am Montag, 23. Juni 2025 um 11:07:57 MESZ hat Christian Grün <cg at basex.org> Folgendes geschrieben:
Hi Hans-Jürgen,
Thanks for the observation. Please check out the latest snapshot [1].
Hope this helps,
Christian
Quoted text · Hans-Juergen Rennau · 15 lines
Von: Hans-Juergen Rennau via BaseX-Talk <basex-talk at mailman.uni-konstanz.de> Gesendet: Sonntag, 22. Juni 2025 23:27 An: BaseX <basex-talk at mailman.uni-konstanz.de> Betreff: [basex-talk] csv:doc - interpretation of option values Dear BaseX people, a small observation, which might be regarded as a bug (perhaps not). It is about the interpretation of options passed to function csv:doc. I set the 'header' option like this: let $options := map{'header': //header/data()} with the confusing result that the option is ignored, although the comparison $options?header eq 'yes' yields true. If I replace data() with string(), let $options := map{'header': //header/string()} the option works as expected. Kind regards, Hans-Jürgen
Written for BaseX 11.9. BaseX may have changed since: please check the current documentation.