Error in 7.6 !! but not in 7.5
Thursday, 14 March 2013 · 2 messages
JB
John Best14 Mar 2013 09:33 #
Hi there,
for $x in (db:fulltext('work', 'string theory')/ancestor::*:Doc except
db:fulltext('work', 'elastic')/ancestor::*:Doc)
return substring(data($x/Publish/PubDate/@d), 7)I am storing Dates in YYYYMMDD Format as <PubDate d="20040608"> tag. The above query will return
the Date of the Document published for the searched criteria. Using the BaseX 7.5, I was able to run the query
correctly. But with 7.6, I am getting error
*"Single item expected, ("20040608", "20040609") found"*
--
Have a nice day
JBest
CG
Christian Grün14 Mar 2013 09:50 #
Quoted text · John Best · 7 lines
> I am storing Dates in YYYYMMDD Format as <PubDate d="20040608"> tag. The > above query will return > the Date of the Document published for the searched criteria. Using the > BaseX 7.5, I was able to run the query > correctly. But with 7.6, I am getting error > > "Single item expected, ("20040608", "20040609") found"
It looks as if a node in your data has several Publish or PubDate children; to confirm this, you could try the following queries..
a) db:open('work')//Doc/Publish[count(PubDate) > 1]
b) db:open('work')//Doc[count(PubDate) > 1]/Publish
As you are searching for string theory, I have some guess that it could also be related to the two-dimensionality of quantum states.
Christian ;)
Written for BaseX 7.6. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery