[xquery-talk] tamino xml server

fatma helmy fatmahelmy2000 at yahoo.com
Sat Jun 24 10:58:10 PDT 2006


does any one have tamino xml server,
if so , can you try this code on a standard file of
100M and tell me how much time does it take
declare 
  function local:pathOfNode($node)  {  
 
 string-join($node/ancestor-or-self::*/local-name(),
   '/') };
   let $j:= . 
   
   let $paths := for $n in $j/*//* return
   local:pathOfNode($n)
   
   for $p in distinct-values($paths) 
    
   let $papa:= replace($p,'/[^/]*$','')
  let $leafs :=$j//text()[normalize-space()] 
  [string-join(../ancestor::*/local-name(), '/') eq
  $p  ] 
   
  return
   <STATISTICS>
     <PATH> {string($p)} </PATH> 
    <RATIO> {let $c := count($paths[.=$papa])
  return
             string( round( count($paths[.=$p]) div
  (if 
  ($c=0) then 1 else $c)
   * 100 ) )}</RATIO>
  {for $val in  distinct-values($leafs) return
    <value-per-path value='{$val}' 
  count='{count($leafs[. eq  $val ])}'/>} 
   
  </STATISTICS> 




__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


More information about the talk mailing list