From: Andrew W. <and...@gm...> - 2011-03-02 13:34:47
|
Hi, You will need to show us how $relationships is created... I will bet it's also selecting some whitespace nodes. cheers andrew On 2 March 2011 09:36, Paolo Di Pietro <pdi...@di...> wrote: > Hi all, > > > > I’m discovering a really strange behavior, and I spent all the day looking > for a possible error, with no luck. > > > > I got a (quite complex) piece of code, which give me an unexpected result. > > > > Please, look at the following fragment, where the third line is commented: > > > > return > > for $rel at $count in > $relationships return ( > > (:if ($count > ne 6) then () else :) > > > let $uuid := $rel/mm:hasObject/@rdf:resource > > > let $el := $ont/*/rdf:Description[@rdf:about eq > $uuid] > > > let $object := > > > if (count($el/mm:isInstanceOf) gt 0) then > > > element rdf:Description { > > > $el/@* > > > ,$ont/*/rdf:Description[@rdf:about eq $el/mm:isInstanceOf/@rdf:resource]/* > > > } > > > else > > > $el > > > return > > > support:getName($rel, $object,$context,false()) > > ) > > > > If I run this piece of code the result is: > > > > Scelta ente > > Scelta ontologia > > Tipi di dati di base (W3C-XML) > > xs:byte > > Accesso al sistema > > mm:menu > > gestione sistema > > > > while, uncommenting the third line, the result is: > > > > menu favoriti > > > > In the first run, I got seven lines (the sixth is incorrect), while in the > second run I got just one line (which is correct) corresponding to the the > sixth line of the commented version : WHY are the different? > > > > Every suggestion is appreciated. I run dozen of tests, rebuid the indexes, > reload the DB, with no luck. > > > > Please help with some ideas. > > > > Running 1.4.0-rev10440-20091111 on windows 7 x32 on vmware workstation > > > > TIA > > > > Paolo > > ------------------------------------------------------------------------------ > Free Software Download: Index, Search & Analyze Logs and other IT data in > Real-Time with Splunk. Collect, index and harness all the fast moving IT > data > generated by your applications, servers and devices whether physical, > virtual > or in the cloud. Deliver compliance at lower cost and gain new business > insights. http://p.sf.net/sfu/splunk-dev2dev > _______________________________________________ > Exist-open mailing list > Exi...@li... > https://lists.sourceforge.net/lists/listinfo/exist-open > > -- Andrew Welch http://andrewjwelch.com |