I have a query that returns a group of records. I want to display a sorted list of results of a node called 'audience' - there can be multiple audience nodes in a document.
Here's a snippet and result list, to put it in context. Am I missing something obvious? xquery version "1.0-ml"; declare namespace ec = "http://www.alm.com/event-calendar"; let $directory:="/data-sources/editorial-calendar/" let $these-docs:= cts:search( xdmp:directory($directory), cts:and-query(( cts:element-attribute-range-query(xs:QName("ec:MaterialsDueDate"), xs:QName("date"), ">=", xs:date(fn:current-date()) ), cts:element-query(xs:QName("ec:approval_status"),cts:word-query("true")) )) ) for $audiences in $these-docs order by fn:data($audiences//ec:audience/@audience) return $audiences//ec:audience/text() >> Consulting Entertainment Food and Beverage Consulting Health Care/Medical Insurance Automotive Real Estate Transportation/Aviation Education Food and Beverage Health Care/Medical
_______________________________________________ General mailing list [email protected] Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general
