From: Hugh C. <hca...@em...> - 2008-11-20 16:15:36
|
I'm trying to run the following query on a collection of METS/MODS docs: declare namespace mods="http://www.loc.gov/mods/v3"; <result> { let $types := distinct-values(//mods:classification) for $t in $types let $c := count(//mods:mods[mods:classification = $t]) return <type>{$t} <num>{$c}</num></type> } </result> This works in plain old Saxon 9 if I point it at one of my METS documents, but it breaks if I run it as an eXist query, with the message: XPTY0018: Cannot mix nodes and atomic values in the result of a path expression. Am I being dense? Or is this a bug? I'm running eXist 1.2.4. Thanks, Hugh /** * Hugh A. Cayless, Ph.D * Head, Research & Development Group * Carolina Digital Library and Archives * UNC Chapel Hill * hca...@em... */ |