Услышьте XML. Я пытаюсь получить Кол-во названий, опубликованном автором в диапазоне дат 15/02/2012 по 24/02/2012 заказать по наивысшему наименьшему (количество названий).Группировка и подсчет в Xquery
<entries>
<entry>
<id>1</id>
<published>23/02/2012</published>
<title>Title 1</title>
<content type="html">This is title one</content>
<author>
<name>Pankaj</name>
</author>
</entry>
<entry>
<id>2</id>
<published>22/02/2012</published>
<title>Title 2</title>
<content type="html">This is title two</content>
<author>
<name>Pankaj</name>
</author>
</entry>
<entry>
<id>3</id>
<published>21/02/2012</published>
<title>Title 3</title>
<content type="html">This is title three</content>
<author>
<name>Rob</name>
</author>
</entry>
<entry>
<id>4</id>
<published>20/02/2012</published>
<title>Title 4</title>
<content type="html">This is title four</content>
<author>
<name>Bob</name>
</author>
</entry>
<entry>
<id>5</id>
<published>19/02/2012</published>
<title>Title 1</title>
<content type="html">This is title five</content>
<author>
<name>Pankaj</name>
</author>
</entry>
Я пытаюсь получить выход из XQuery:
<?xml version="1.0" encoding="UTF-8"?>
<results>
<result>
<author>
<name>Pankaj</name>
</author>
<numberOfTitles>3</numberOfTitles>
</result>
<result>
<author>
<name>Rob</name>
</author>
<numberOfTitles>1</numberOfTitles>
</result>
<result>
<author>
<name>Bob</name>
</author>
<numberOfTitles>1</numberOfTitles>
</result>
Пожалуйста, помогите мне ..
Это зависит от используемой версии XQuery. Какой процессор/база XQuery должен выполнять этот запрос? – Shcheklein
Im, использующий кислород (Saxon-PE Xquery9.2.0.6) для разработки. Наконец, я должен запустить этот запрос через XCC api на Marklogic. – Pankaj