And you should really create a sequence of strings instead of a sequence of elements. For example:
fn:string-join(/catalog/book/ comments/comment/Text/fn:string(),"") -Danny From: [email protected] [mailto:[email protected]] On Behalf Of Etanchaud Fabrice Sent: Tuesday, October 20, 2015 4:08 AM 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]] De la part de Anoop Khetan Envoyé : mardi 20 octobre 2015 12:51 À : [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
