Hi, I am using a similar query (count(/something)) and getting the following result, which is not what i expected either. It seems as if the numbers are enclosed in a XML node. I would expect a String containing only the number.
If i look at the result, it seems that for each dokument in a collection a result is included. Is this so? I am using 1.1b4-dev. Regards, Torsten Steinert <xq:result xmlns:xq="http://xml.apache.org/xindice/Query" xq:col="/db/testDataSt ore" xq:key="0affa7c02485aebd000000fb52f2fcd1">0.0</xq:result><xq:result xmlns:x q="http://xml.apache.org/xindice/Query" xq:col="/db/testDataStore" xq:key="0affa 7c02485aebd000000fb52f2fce5">1.0</xq:result><xq:result xmlns:xq="http://xml.apac he.org/xindice/Query" xq:col="/db/testDataStore" xq:key="0affa7c02485aebd000000f b52f2fcf9">1.0</xq:result>> -----Ursprüngliche Nachricht----- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Vadim Gritsenko Gesendet: Freitag, 12. März 2004 20:47 An: xindice-users@xml.apache.org Betreff: Re: XPath count() Manuel Darveau wrote: >Hi! > >I tried the following XPath query: >String query = "count(/[EMAIL PROTECTED]'test1'])"; > >And the output of: >... >Resource res = results.nextResource(); >System.out.println((String) res.getContent()); > >Is: >0.01.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.0 0.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00 .00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00. 00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.0 0.00.01.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00 .00.00.00.01.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00. 00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.0 0.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00 .00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00. 00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.0 0.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.01 .00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00. 00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.0 0.00.00.00. >00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00. 00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.0 0.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00 .00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00. 00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.0 0.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00 .00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00. 00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.0 0.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00 .00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00. 00.00.00.00.00.00.00.00.00.00.00.00.0 > >Witch is not a good answer. Any idea why? > > Because you are using 1.1b3. You should be using 1.1b4-dev for this query to work properly. Vadim