Hi All,
I am confused with the behavior of "xdmp:collection-delete($collectionUri)".

I have  following test cases>>>

Let I have 2 xmls "Book1.xml" and "Book2.xml".

Case-1

a.       I have ingested both the xmls in MarkLogic database in "myBooks1" and 
"myBooks2" collections.

b.      "myBooks1" collection have "Book1.xml".

c.       "myBooks2" collection have "Book2.xml".

d.      I executed "xdmp:collection-delete('myBook1')", then the named 
collection got deleted from the database and Book1.xml is also deleted.

Case-2

a.       I have ingested both the xmls in MarkLogic database in "myBooks1" and 
"myBooks2" collections.

b.      "myBooks1" collection have "Book1.xml".

c.       "myBooks2" collection have both "Book1.xml" and "Book2.xml".

d.      Let by mistake , I executed "xdmp:collection-delete('myBook1')", then 
the named collection got deleted from the database and Book1.xml is also 
deleted.


Now data of "myBook2" collection became inconsistent. Because 
"xdmp:collection-delete('myBook1')" deleted the "Book1.xml" from both the 
collections.
Why it is so? It should delete the documents which belongs to "myBook1' 
collection only.

Please guide me, whether I am thinking wrongly ?

Thanks,
Abhinav Kumar Mishra

From: [email protected] 
[mailto:[email protected]] On Behalf Of Tim
Sent: Saturday, May 18, 2013 7:53 AM
To: 'MarkLogic Developer Discussion'
Subject: Re: [MarkLogic Dev General] How can I extract the text within a PCDATA 
element in an XML document?

Thank you!

:) Tim

From: 
[email protected]<mailto:[email protected]>
 [mailto:[email protected]] On Behalf Of Loren Cahlander
Sent: Friday, May 17, 2013 9:37 PM
To: MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] How can I extract the text within a PCDATA 
element in an XML document?

You can use the XPath expression:    /data/comment()
On May 17, 2013, at 8:23 PM, "Tim" <[email protected]<mailto:[email protected]>> wrote:

Give the following record, how can I extract the text from the comment?

<data error="1" num-seq="20">
<!-- Warning: Content model for data does not allow PCDATA in unnamed entity at 
line ___ char ___ of file:///___.xml--<file:///\\___.xml-->>
</data>

Thank you!

Tim Meagher

_______________________________________________
General mailing list
[email protected]<mailto:[email protected]>
http://developer.marklogic.com/mailman/listinfo/general

This e-mail and any files transmitted with it are for the sole use of the 
intended recipient(s) and may contain confidential and privileged information. 
If you are not the intended recipient(s), please reply to the sender and 
destroy all copies of the original message. Any unauthorized review, use, 
disclosure, dissemination, forwarding, printing or copying of this email, 
and/or any action taken in reliance on the contents of this e-mail is strictly 
prohibited and may be unlawful.
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to