Hi all
I have a database collection which gives a strange error message
'[FODC0002] "" (Line 1): Content is not allowed in prolog.'
on this query:
for $x in collection('samtiden') return doc(document-uri($x))
The results from document-uri($x) are as expected, but doc(document-uri($x)) should return $x - so what can be the cause of the error?
The collection was entered in the gui using "skip corrupt files" since some of the files had errors (ended prematurely). But the database and document-uri() works fine for all elements in the database.
I need to process the paths for grouping the documents in the collection, so the practical value is a bit more than just trying to compute a unity function!
Best, Lars G Johnsen National Library of Norway
Hi Lars,
The results from document-uri($x) are as expected, but doc(document-uri($x)) should return $x - so what can be the cause of the error?
Could you possibly give me some examples what is returned by document-uri($x)? Could you additionally me what is returned by the following query?
for $x in db:open('samtiden') return db:path($x))
Best, Christian
The collection was entered in the gui using "skip corrupt files" since some of the files had errors (ended prematurely). But the database and document-uri() works fine for all elements in the database.
I need to process the paths for grouping the documents in the collection, so the practical value is a bit more than just trying to compute a unity function!
Best, Lars G Johnsen National Library of Norway
Hi Lars,
The issue should be fixed with the latest snapshot [1].
फिर मिलेंगे, Christian
[1] http://files.basex.org/releases/latest
On Tue, Mar 10, 2015 at 6:23 PM, Lars Johnsen yoonsen@gmail.com wrote:
Hi all
I have a database collection which gives a strange error message
'[FODC0002] "" (Line 1): Content is not allowed in prolog.'
on this query:
for $x in collection('samtiden') return doc(document-uri($x))
The results from document-uri($x) are as expected, but doc(document-uri($x)) should return $x - so what can be the cause of the error?
The collection was entered in the gui using "skip corrupt files" since some of the files had errors (ended prematurely). But the database and document-uri() works fine for all elements in the database.
I need to process the paths for grouping the documents in the collection, so the practical value is a bit more than just trying to compute a unity function!
Best, Lars G Johnsen National Library of Norway
Thanks, new snapshot downloaded, but the errors persist in some way or another (not exactly the same).
However, since you mentioned that the problems were caused by colons in filenames, removing those colons did the trick. Now it all works as expected. The colon-free-folders can be referenced with collection(), as well as being ingested. All is well.
Alles klar! Lars
2015-03-11 18:57 GMT+01:00 Christian Grün christian.gruen@gmail.com:
Hi Lars,
The issue should be fixed with the latest snapshot [1].
फिर मिलेंगे, Christian
[1] http://files.basex.org/releases/latest
On Tue, Mar 10, 2015 at 6:23 PM, Lars Johnsen yoonsen@gmail.com wrote:
Hi all
I have a database collection which gives a strange error message
'[FODC0002] "" (Line 1): Content is not allowed in prolog.'
on this query:
for $x in collection('samtiden') return doc(document-uri($x))
The results from document-uri($x) are as expected, but
doc(document-uri($x))
should return $x - so what can be the cause of the error?
The collection was entered in the gui using "skip corrupt files" since
some
of the files had errors (ended prematurely). But the database and document-uri() works fine for all elements in the database.
I need to process the paths for grouping the documents in the
collection, so
the practical value is a bit more than just trying to compute a unity function!
Best, Lars G Johnsen National Library of Norway
An attempt with a brand new family of colon-infected folders (not databases), works nicely now withthe new snapshot. While the same commands in the old version still generated the FODC0002 error:
So both of these worked nicely in the new snapshot (strings refers to files and folders - not database paths):
collection("/home/larsj/terra/Synsegn/URN:NBN:no-nb_digitidsskrift_2014092382210_001")
as well as
doc("/home/larsj/terra/Synsegn/URN:NBN:no-nb_digitidsskrift_2014092382210_001/Alto_13.xml")
Cheers Lars
2015-03-12 11:05 GMT+01:00 Christian Grün christian.gruen@gmail.com:
Thanks, new snapshot downloaded, but the errors persist in some way or another (not exactly the same).
Does it stil have to with colons? If you find out more about it, feel free to tell me.
Takk, Christian
basex-talk@mailman.uni-konstanz.de