Hi Anoop, I am afraid I do not understand what you want to achieve. Do you want to filter specific Text elements based on a pattern on their text() ? Something like string-join(Text[your filter condition here], ‘ ‘) could do the job.
Regards, Fabrice De : [email protected] [mailto:[email protected]] De la part de Anoop Khetan Envoyé : mercredi 21 octobre 2015 14:29 À : MarkLogic Developer Discussion <[email protected]> Objet : Re: [MarkLogic Dev General] error in fn:concate Thanks Fabrice for help !! However using string-join, I am getting values of all <Text> tags instead of “abc”. Can you please help how to go ahead. Regards, Anoop Khetan From: [email protected]<mailto:[email protected]> [mailto:[email protected]] On Behalf Of Etanchaud Fabrice Sent: Tuesday, October 20, 2015 4:38 PM To: MarkLogic Developer Discussion Subject: Re: [MarkLogic Dev General] error in fn:concate Hi, For that purpose, you should use string-join : http://www.xqueryfunctions.com/xq/fn_concat.html http://www.xqueryfunctions.com/xq/fn_string-join.html for concat does not allow sequences as argument. Best regards, Fabrice De : [email protected]<mailto:[email protected]> [mailto:[email protected]] De la part de Anoop Khetan Envoyé : mardi 20 octobre 2015 12:51 À : [email protected]<mailto:[email protected]> Objet : [MarkLogic Dev General] error in fn:concate Hi All, I am using similar XML as below, it has multiple <comment> tags, but I need to fn:concat of such XMLs which has <Text>abc</Text>. Could anyone help me, how to phrase this in fn:concat which will only populate <Text>abc</Text>. fn:concat (/catalog/book/ comments/comment/Text) Error which I am getting is : arg is not of Type xs:anyAtomic <?xml version="1.0"?> <catalog> <book id="bk101"> <author>Gambardella, Matthew</author> <title>XML Developer's Guide</title> <genre>Computer</genre> <price>44.95</price> <publish_date>2000-10-01</publish_date> <description>An in-depth look at creating applications with XML.</description> <comments> <comment> <Text>abc</Text> </comment> <comment> <Text>123</Text> </comment> <comment> <Text>Abc123</Text> </comment> <comment> <Text>abc@123</Text> </comment> </comments> </book> </catalog> **************** CAUTION - Disclaimer ***************** This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the use of the addressee(s). If you are not the intended recipient, please notify the sender by e-mail and delete the original message. Further, you are not to copy, disclose, or distribute this e-mail or its contents to any other person and any such actions are unlawful. This e-mail may contain viruses. Infosys has taken every reasonable precaution to minimize this risk, but is not liable for any damage you may sustain as a result of any virus in this e-mail. You should carry out your own virus checks before opening the e-mail or attachment. Infosys reserves the right to monitor and review the content of all messages sent to or from this e-mail address. Messages sent to or from this e-mail address may be stored on the Infosys e-mail system. ***INFOSYS******** End of Disclaimer ********INFOSYS***
_______________________________________________ General mailing list [email protected] Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general
