Error in 7.6 !! but not in 7.5
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"*
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.