Changeset 705 for MDRepository
- Timestamp:
- 09/19/10 13:12:21 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
MDRepository/trunk/xquery/cmd-model.xqm
r701 r705 42 42 43 43 declare function cmd-model:elem-r($collection as xs:string, $path as xs:string, $max-depth as xs:integer, $depth as xs:integer) as element() { 44 let $path-nodes := util:eval(fn:concat("collection('", $collection, "')//", $path)) 44 (: let $path-nodes := util:eval(fn:concat("collection('", $collection, "')//", $path)) :) 45 let $path-nodes := for $coll in $collection return util:eval(fn:concat("collection('", $cmd-model:cmdiMirrorPath, "')//CMD[.//IsPartOf='", xdb:decode($coll) ,"']")) 45 46 let $path-count := count($path-nodes) 46 47 … … 181 182 $dummy := xdb:login($cmd-model:cmdiDatabaseURI, $clarin-writer//write-user/text(), $clarin-writer//write-user-cred/text()) 182 183 return 183 xdb:store($cmd-model:commonFreqsPath, cmd-model:make-compound-doc-name($coll-names, $type-name, xs:string($depth)), cmd-model:make-doc-element-of-type($type-name, $coll-names, $entries, $depth))184 xdb:store($cmd-model:commonFreqsPath, cmd-model:make-compound-doc-name($coll-names, $type-name, xs:string($depth)), cmd-model:make-doc-element-of-type($type-name, $coll-names, $entries, xs:string($depth))) 184 185 }; 185 186 … … 314 315 :) 315 316 declare function cmd-model:search-retrieve($cql-query as xs:string, $collection as xs:string+, $format as xs:string, $start-item as xs:integer, $end-item as xs:integer) as item()* { 316 let $results := for $coll in $collection return util:eval(fn:concat("collection('", xdb:decode($coll), "')", xdb:decode($cql-query), "/ancestor::CMD")), 317 (: let $results := for $coll in $collection return util:eval(fn:concat("collection('", xdb:decode($coll), "')", xdb:decode($cql-query), "/ancestor::CMD")), :) 318 let $results := for $coll in $collection return util:eval(fn:concat("collection('", $cmd-model:cmdiMirrorPath, "')", xdb:decode($cql-query), "/ancestor::CMD", "[.//IsPartOf='", xdb:decode($coll) ,"']")), 317 319 $result-count := fn:count($results), 318 320 $result-seq := fn:subsequence($results, $start-item, $end-item),
Note: See TracChangeset
for help on using the changeset viewer.