Changeset 800 for MDRepository
- Timestamp:
- 10/17/10 21:52:22 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
MDRepository/trunk/xquery/cmd-model.xqm
r798 r800 123 123 $text-count-distinct := count(distinct-values($text-nodes)) 124 124 return 125 (: <Term path="{fn:concat("//", $path)}" name="{text:groups($path, "/([^/]+)$")[last()]}" count="{$path-count}" count_text="{$text-count}" count_distinct_text="{$text-count-distinct}">{ :) 125 126 <Term path="{fn:concat("//", $path)}" name="{(text:groups($path, "/([^/]+)$")[last()],$path)[1] }" count="{$path-count}" count_text="{$text-count}" count_distinct_text="{$text-count-distinct}">{ 126 127 if ($depth > 0) then … … 219 220 :) 220 221 declare function cmd-model:get-children-colls($collection as node()+) as node()* { 221 let $proxies := $collection//ResourceProxy[ResourceType='Metadata']/ResourceRef 222 (: let $proxies := $collection//ResourceProxy[ResourceType='Metadata']/ResourceRef :) 222 223 let $handle := $collection//MdSelfLink 224 return collection($cmd-model:cmdiMirrorPath)//IsPartOf[@level=1][matches(.,$handle)]/ancestor::CMD[descendant::ResourceType[. = "Metadata"]] 225 (: this turned out to be very inefficient!!: 223 226 return collection($cmd-model:cmdiMirrorPath)//CMD[descendant::MdSelfLink = $proxies/.][descendant::ResourceType = "Metadata"] 224 225 (: alternatively we could rely on IsPartOf + IsPartOf/@level 226 return collection($cmd-model:cmdiMirrorPath)//IsPartOf[. eq $handle]/ancestor::CMD[descendant::ResourceType[. = "Metadata"]] :) 227 :) 227 228 }; 228 229
Note: See TracChangeset
for help on using the changeset viewer.