Attribute index
Wednesday, 1 December 2021 · 3 messages
JB
Johannes Bauer1 Dec 2021 14:17 #
Hi,
I want to use the attribute index to access attribute nodes.
The following calls in the DBA web interface are working as expected:
db:attribute('db', ('6LE007573', '6DC007573'), 'book')
db:attribute('db', ('6LE007573', '6DC007573'))They return the attribute nodes with the given values. The attribute index exists and is uptodate.
But in the context of a RESTXQ service the first one does not work. It does not return any attribute. The second one works strangely.
Any ideas?
Regards
Johannes
CG
Christian Grün1 Dec 2021 14:23 #
Hi Johannes,
In general, it shouldn’t make a difference if you run a query standalone, in the client/server context or with RESTXQ. Do you think you can provide us with an SSCCE?
Thanks in advance
Christian
Quoted text · Johannes Bauer · 24 lines
On Wed, Dec 1, 2021 at 2:17 PM Johannes Bauer <johannes.bauer at tanner.de> wrote: > Hi, > > I want to use the attribute index to access attribute nodes. > > The following calls in the DBA web interface are working as expected: > > db:attribute('db', ('6LE007573', '6DC007573'), 'book') > db:attribute('db', ('6LE007573', '6DC007573')) > > They return the attribute nodes with the given values. The attribute > index exists and is uptodate. > > But in the context of a RESTXQ service the first one does not work. It > does not return any attribute. The second one works strangely. > > Any ideas? > > Regards > Johannes > > >
JB
I think I found the cause.
This has something to do with namespaces. If I use:
db:attribute('db', ('6LE007573', '6DC007573'), '**:book'*)its working in the RESTXQ context as well. But it is strange because the content in the database does not use any namespaces.
Cheers
Johannes
Quoted text · Johannes Bauer · 22 lines
Am 01.12.2021 um 14:17 schrieb Johannes Bauer: > Hi, > > I want to use the attribute index to access attribute nodes. > > The following calls in the DBA web interface are working as expected: > > db:attribute('db', ('6LE007573', '6DC007573'), 'book') > db:attribute('db', ('6LE007573', '6DC007573')) > > They return the attribute nodes with the given values. The attribute > index exists and is uptodate. > > But in the context of a RESTXQ service the first one does not work. It > does not return any attribute. The second one works strangely. > > Any ideas? > > Regards > Johannes > >
Written for BaseX 9.6. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery