Hi Ron, Got your point, thank you very much such cool explaination :-) On May 20, 2013 11:55 PM, <[email protected]> wrote:
> Send General mailing list submissions to > [email protected] > > To subscribe or unsubscribe via the World Wide Web, visit > http://developer.marklogic.com/mailman/listinfo/general > or, via email, send a message with subject or body 'help' to > [email protected] > > You can reach the person managing the list at > [email protected] > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of General digest..." > > > Today's Topics: > > 1. Re: Why xdmp:collection-delete() is deleting the documents if > documents are also belongs to other collections? (Ron Hitchens) > 2. Re: Why xdmp:collection-delete() is deleting the documents if > documents are also belongs to other collections? (Ron Hitchens) > 3. Updating ML license(s) progamatically (Bob O) > 4. Re: Updating ML license(s) progamatically (Michael Blakeley) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Mon, 20 May 2013 11:28:15 +0100 > From: Ron Hitchens <[email protected]> > Subject: Re: [MarkLogic Dev General] Why xdmp:collection-delete() is > deleting the documents if documents are also belongs to other > collections? > To: MarkLogic Developer Discussion <[email protected]> > Message-ID: <[email protected]> > Content-Type: text/plain; charset=windows-1252 > > > It's important to understand that a collection is not a separate, > standalone thing. A collection is simply a list of all the documents > that have been given that collection name. Internally, a collection is > a term list with an entry for each collection name. Each entry is a list > of all documents that have been tagged with that collection name. When > the last document is gone for a particular collection name, that term list > entry is empty and thus that collection no longer exists. > > Collection membership(s) is an indexed property of documents. You never > manipulate collections directly. > > The function xdmp:collection-delete() does not remove collection > membership from documents. It deletes all documents that belong to > a collection. So, when you called xdmp:collection-delete(?myBook1?), > it deleted Book1.xml. Book1.xml was a member of both collections. > When it was deleted, it disappeared from both of them. The myBooks1 > collection ceased to exist because it became empty. And myBooks2 was > left with one surviving member, Book2.xml. > > The same thing would have happened if you'd simply called > fn:document-delete ("Book1.xml") > > You should also look at xdmp:document-[add, remove, set]-collections() > > On May 20, 2013, at 10:48 AM, [email protected] wrote: > > > 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! > > > > J Tim > > > > From: [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]> 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--> > > </data> > > > > Thank you! > > > > Tim Meagher > > > > _______________________________________________ > > General mailing list > > [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 > > --- > Ron Hitchens {mailto:[email protected]} Ronsoft Technologies > +44 7879 358 212 (voice) http://www.ronsoft.com > +1 707 924 3878 (fax) Bit Twiddling At Its Finest > "No amount of belief establishes any fact." -Unknown > > > > > > > ------------------------------ > > Message: 2 > Date: Mon, 20 May 2013 11:30:36 +0100 > From: Ron Hitchens <[email protected]> > Subject: Re: [MarkLogic Dev General] Why xdmp:collection-delete() is > deleting the documents if documents are also belongs to other > collections? > To: MarkLogic Developer Discussion <[email protected]> > Message-ID: <[email protected]> > Content-Type: text/plain; charset=windows-1252 > > > s/fn:document-delete/xdmp:document-delete/ > > On May 20, 2013, at 11:28 AM, Ron Hitchens <[email protected]> wrote: > > > > > It's important to understand that a collection is not a separate, > > standalone thing. A collection is simply a list of all the documents > > that have been given that collection name. Internally, a collection is > > a term list with an entry for each collection name. Each entry is a list > > of all documents that have been tagged with that collection name. When > > the last document is gone for a particular collection name, that term > list > > entry is empty and thus that collection no longer exists. > > > > Collection membership(s) is an indexed property of documents. You > never > > manipulate collections directly. > > > > The function xdmp:collection-delete() does not remove collection > > membership from documents. It deletes all documents that belong to > > a collection. So, when you called xdmp:collection-delete(?myBook1?), > > it deleted Book1.xml. Book1.xml was a member of both collections. > > When it was deleted, it disappeared from both of them. The myBooks1 > > collection ceased to exist because it became empty. And myBooks2 was > > left with one surviving member, Book2.xml. > > > > The same thing would have happened if you'd simply called > > fn:document-delete ("Book1.xml") > > > > You should also look at xdmp:document-[add, remove, set]-collections() > > > > On May 20, 2013, at 10:48 AM, [email protected] wrote: > > > >> 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! > >> > >> J Tim > >> > >> From: [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]> 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--> > >> </data> > >> > >> Thank you! > >> > >> Tim Meagher > >> > >> _______________________________________________ > >> General mailing list > >> [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 > > > > --- > > Ron Hitchens {mailto:[email protected]} Ronsoft Technologies > > +44 7879 358 212 (voice) http://www.ronsoft.com > > +1 707 924 3878 (fax) Bit Twiddling At Its Finest > > "No amount of belief establishes any fact." -Unknown > > > > > > > > > > --- > Ron Hitchens {mailto:[email protected]} Ronsoft Technologies > +44 7879 358 212 (voice) http://www.ronsoft.com > +1 707 924 3878 (fax) Bit Twiddling At Its Finest > "No amount of belief establishes any fact." -Unknown > > > > > > > ------------------------------ > > Message: 3 > Date: Mon, 20 May 2013 10:44:57 -0500 > From: Bob O <[email protected]> > Subject: [MarkLogic Dev General] Updating ML license(s) progamatically > To: General Mark Logic Developer Discussion > <[email protected]> > Message-ID: > <CALPC1yVyU8_4XUXw8PszCNnu911e=hvNwRitKi6T0dmwdQJ= > [email protected]> > Content-Type: text/plain; charset="iso-8859-1" > > Hi, Everyone! > > I have a question: Is there a way to programatically update the MarkLogic > License ? I'm taking on a ML project with the government and I need some > guidance on a few things. > > I apreciate any assistance anyone can give me. > > Thanks, > > Bob O. > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > http://developer.marklogic.com/pipermail/general/attachments/20130520/73504c31/attachment-0001.html > > ------------------------------ > > Message: 4 > Date: Mon, 20 May 2013 10:06:57 -0700 > From: Michael Blakeley <[email protected]> > Subject: Re: [MarkLogic Dev General] Updating ML license(s) > progamatically > To: MarkLogic Developer Discussion <[email protected]> > Message-ID: <[email protected]> > Content-Type: text/plain; charset=iso-8859-1 > > You can read the license with xdmp:host-status. But I don't think there is > an API to update it. > > Of course you could do something unsupported: simulating a post to > Admin/license.xqy for example, or writing directly to the underlying > filesystem. For license keys either approach should be fairly easy. Be sure > to restart as needed. > > A similar gap in the admin API is cluster setup. I've done this by > simulating browser requests, but it isn't pretty. Writing the config files > directly to the host filesystems is a bit cleaner, but somewhat tricky to > get right. > > -- Mike > > On 20 May 2013, at 08:44 , Bob O <[email protected]> wrote: > > > > > Hi, Everyone! > > > > I have a question: Is there a way to programatically update the > MarkLogic License ? I'm taking on a ML project with the government and I > need some guidance on a few things. > > > > I apreciate any assistance anyone can give me. > > > > Thanks, > > > > Bob O. > > _______________________________________________ > > General mailing list > > [email protected] > > http://developer.marklogic.com/mailman/listinfo/general > > > > ------------------------------ > > _______________________________________________ > General mailing list > [email protected] > http://developer.marklogic.com/mailman/listinfo/general > > > End of General Digest, Vol 107, Issue 61 > **************************************** >
_______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
