logo       

divide by zero: msg#00072

Subject: divide by zero
yes, i did something like this 
if ($x=0) then 1 else $x
but i need it inside my code so i added
the following
for $p in distinct-values($paths) 
let $papa:= replace($p,'/[^/]*$','') 
let $leafs :=$j//text()[normalize-space()]
[string-join(ancestor-or-self::element()/name(),'/')
eq substring-after(string($p),"/") ] 
 
return 
<STATISTICS> 
<PATH> 
{string($p)} 
</PATH> 
<RATIO>
 
{ if (count($paths[.=$papa]) = 0) then let $rat:=1
else let $rat:=count($paths[.=$papa])
return
  string( round( count($paths[.=$p]) div $rat * 100 )
)} 
</RATIO> 
{for $val in  distinct-values( $leafs) 
let $kval := normalize-space($val) 
return <value-per-path value='{$kval}' 
count='{count($leafs[. eq  $kval ])}'/>} 
</STATISTICS> 


but i got errors




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


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
boot-loaders.gr...    php.pear.genera...    debugging.valgr...    kde.redhat.user...    text.xml.xsl.ge...    culture.languag...    hardware.microc...    java.servicemix...    redhat.release....    web.zope.plone....    user-groups.lin...    opendarwin.webk...    video.mjpeg.use...    sysutils.bcfg2....    encryption.gpg....    lx-office.devel...    xfree86.forum/2...    mail.mutt.devel...    acpi.devel/2003...    qnx.openqnx.dev...    network.irc.irs...    freebsd.devel.m...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe