Geert,

 So is that an issue or is it how it works.  

Thanks
Pradeep Maddireddy

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Geert
Josten
Sent: Thursday, March 26, 2009 5:14 PM
To: General Mark Logic Developer Discussion
Subject: RE: [MarkLogic Dev General] issue with XPATH

Pradeep,

Yes, I think the result should be the same. It looks like the first
approach is interpreted as (doc(..)//b)[position() = 2].

Eric,

Yes, a = b returns true if any item from sequence a is equal to any item
in sequence b. You can best see it as an intersect on atomic values,
returning all items in a that are also in b, but none in b that are not
in a though..

Kind regards,
Geert

>


Drs. G.P.H. Josten
Consultant


http://www.daidalos.nl/
Daidalos BV
Source of Innovation
Hoekeindsehof 1-4
2665 JZ Bleiswijk
Tel.: +31 (0) 10 850 1200
Fax: +31 (0) 10 850 1199
http://www.daidalos.nl/
KvK 27164984
De informatie - verzonden in of met dit emailbericht - is afkomstig van
Daidalos BV en is uitsluitend bestemd voor de geadresseerde. Indien u
dit bericht onbedoeld hebt ontvangen, verzoeken wij u het te
verwijderen. Aan dit bericht kunnen geen rechten worden ontleend.


> From: [email protected]
> [mailto:[email protected]] On Behalf Of
> Eric Palmitesta
> Sent: donderdag 26 maart 2009 21:46
> To: General Mark Logic Developer Discussion
> Subject: Re: [MarkLogic Dev General] issue with XPATH
>
> Perhaps I spoke too soon!
>
> As I understand, A=B means "return true if A is found
> anywhere in the sequence B".  Can someone confirm this?
>
> Thanks (and sorry to derail),
>
> Eric
>
> Eric Palmitesta wrote:
> > Equality testing of non-sequences should use "eq".  Try...
> >
> > [position() eq 2]
> >
> > Eric
> >
> > Pradeep Maddireddy wrote:
> >> Hi..!
> >>
> >>
> >>
> >>   I have a document with the following content
> >>
> >>
> >>
> >> <root>
> >>
> >>   <a>
> >>
> >>     <b id="1-1">1</b>
> >>
> >>   </a>
> >>
> >>   <a>
> >>
> >>     <b id="2-1">1</b>
> >>
> >>     <b id="2-2">1</b>
> >>
> >>   </a>
> >>
> >>   <a>
> >>
> >>     <b id="3-1">1</b>
> >>
> >>     <b id="3-2">1</b>
> >>
> >>   </a>
> >>
> >> </root>
> >>
> >>
> >>
> >> I think both the following xpath expression should give the same
> >> result but they are giving different results, is it an issue in
> >> marklogic
> >>
> >>
> >>
> >> doc("/root/ab.xml")//b[position()=2]
> >>
> >>
> >>
> >> <b id="2-1">1</b>
> >>
> >>
> >>
> >> doc("/root/ab.xml")//b[2]
> >>
> >>
> >>
> >>   <b id="2-2">1</b>
> >>   <b id="3-2">1</b>
> >>
> >>
> >>
> >>
> >>
> >> Thanks
> >>
> >> Pradeep Maddireddy
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> ---------------------------------------------------------------------
> >> ---
> >>
> >> _______________________________________________
> >> General mailing list
> >> [email protected]
> >> http://xqzone.com/mailman/listinfo/general
> > _______________________________________________
> > General mailing list
> > [email protected]
> > http://xqzone.com/mailman/listinfo/general
> _______________________________________________
> General mailing list
> [email protected]
> http://xqzone.com/mailman/listinfo/general
>

_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general




_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

Reply via email to