fn:doc("c:/...")
Friday, 13 December 2013 · 2 messages
HR
Hans-Juergen Rennau13 Dec 2013 13:40 #
Dear BaseX team,
I'm a little confused by the behavior of the
fn:doc function:
doc('/c:/projects/foo.xml')
yields this error msg:
[FODC0002] Line 1: No text allowed before root element.
Whereas these work:
doc('c:/projects/foo.xml')
doc('file://c:/projects/foo.xml')
Is this a bug or a feature? At any rate the error msg is confusing. I've used the latest snapshot (20131211.173706).
Kind regards,
Hans-JuergenFE
Fabrice Etanchaud13 Dec 2013 13:55 #
It seems that when the argument does not match any path (on disk or in the collections), its content is taken as xml :
fn:doc('<root/>') --> <root/>Quoted text · Hans-Juergen Rennau · 16 lines
De : basex-talk-bounces at mailman.uni-konstanz.de [mailto:basex-talk-bounces at mailman.uni-konstanz.de] De la part de Hans-Juergen Rennau Envoyé : vendredi 13 décembre 2013 13:41 À : basex-talk at mailman.uni-konstanz.de Objet : [basex-talk] fn:doc("c:/...") Dear BaseX team, I'm a little confused by the behavior of the fn:doc function: doc('/c:/projects/foo.xml') yields this error msg: [FODC0002] Line 1: No text allowed before root element. Whereas these work: doc('c:/projects/foo.xml') doc('file://c:/projects/foo.xml') Is this a bug or a feature? At any rate the error msg is confusing. I've used the latest snapshot (20131211.173706). Kind regards, Hans-Juergen
Written for BaseX 7.7. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery