Error?

Tuesday, 10 March 2015 · 6 messages · last reply 12 Mar 2015
LJ
Lars Johnsen10 Mar 2015 18:23 #
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
CG
Christian Grün11 Mar 2015 09:42 #
Hi Lars,
Quoted text · Lars Johnsen · 2 lines
> 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
Quoted text · Lars Johnsen · 16 lines
> 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 > > > > >
CG
Christian Grünin reply to Lars Johnsen, 10 Mar 2015, 18:2311 Mar 2015 18:57 #
Hi Lars, The issue should be fixed with the latest snapshot [1]. फिर मिलेंगे, Christian [1] http://files.basex.org/releases/latest
Quoted text · Lars Johnsen · 31 lines
On Tue, Mar 10, 2015 at 6:23 PM, Lars Johnsen <yoonsen at 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 > > > > >
LJ
Lars Johnsen12 Mar 2015 11:03 #
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 at gmail.com>:
Quoted text · Christian Grün · 46 lines
> 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 at 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 > > > > > > > > > > >
CG
Christian Grün12 Mar 2015 11:05 #
Quoted text · Lars Johnsen · 2 lines
> 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
LJ
Lars Johnsen12 Mar 2015 11:25 #
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 at gmail.com>:
Quoted text · Christian Grün · 9 lines
> > 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 >

⚡Generated with XQuery