[MarkLogic Dev General] Set Operations
Gnana Thomas Arockiam
a.gnanathomas at gmail.com
Thu Dec 9 07:19:50 PST 2010
Team,
I have following two xmls,
*\test\BookCatalog.xml*
<catalog>
<book id="101">
<author>Gambardella, Matthew</author>
<title>XML Developer's Guide</title>
</book>
<book id="102">
<author>Ralls, Kim</author>
<title>Midnight Rain</title>
</book>
</catalog>
*\test\NewBookCatalog.xml*
<catalog>
<book id="101">
<author>Gambardella, Matthew</author>
<title>XML Developer's Guide</title>
</book>
<book id="103">
<author>Corets, Eva</author>
<title>Oberon's Legacy</title>
</book>
</catalog>
While I use the set operations intersect, difference, union on book tags of
these two xmls I am not getting the desire output. I was expecting a result
set which contain the book tag with id "101" while doing an intersection
operation. I tried in the following way which gave me the empty sequence as
result
let $a := doc("\test\BookCatalog.xml")/catalog/book
let $b := doc("\test\NewBookCatalog.xml")/catalog/book
return
$a intersect $b
Please let me know if I can achieve the desired output sequences using set
operations
Regards,
Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://developer.marklogic.com/pipermail/general/attachments/20101209/e3164ff0/attachment.html
More information about the General
mailing list