Hello,
I’m new in the TaminoAPI4Java with XQuery.
I need to obtain the number of documents that satisfies a XQuery. I’ve tried using the count function but, although the XQuery is correctly parsed, the result is’nt the desired.
I better show you a simple example for an imaginary Entity called Press:
The XQuery is:
for $p in input()/Press, $f in $p/fecha
where $f=“2003/05/03”
return $p
In my app, in order to obtain the number of documents, I transform the String as follows:
count(
for $p in input()/Press, $f in $p/fecha
where $f=“2003/05/03”
return $p)
This XQuery with the Tamino Interactive Interface returns:
xq:value27</xq:value>
But the TaminoAPI4J returns:
xq:value/
The piece of code that performs the XQuery is:
(…)
tsAccessor = connection.newStreamAccessor( TAccessLocation.newInstance( inoCol ) );
TXQuery xQuery = TXQuery.newInstance (myQuery);
tis = tsAccessor.xquery( xQuery );
(…)
Do you know why? Can you help me to do this?
Thanks in advance,
Pau.
Pau Garc
#webMethods#webMethods-Tamino-XML-Server-APIs#API-Management