Hi, Pragya:

If the goal is a sequence of two items, the stated code should be
possible to simplify to the following single line:

    (" ABC XYZ ", $data/fn:data(following-sibling::p))

If the goal is a single concatenated string, the stated code should be
possible to simplify to the following single line:

    fn:concat(" ABC XYZ ", $data/fn:string(following-sibling::p))


Hoping that helps,


Erik Hennum


________________________________
From: [email protected] 
[[email protected]] on behalf of Kapoor, Pragya 
[[email protected]]
Sent: Wednesday, December 28, 2016 10:38 PM
To: MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] xdmp:value


I was able to do this by


          let $docText := fn:data($data/following-sibling::p)
                           let $x := fn:data(<CSA>[ ABC XYZ ]</CSA>)

                           return( $x,$docText)



________________________________
From: [email protected] 
<[email protected]> on behalf of Kapoor, Pragya 
<[email protected]>
Sent: Thursday, December 29, 2016 12:03:40 PM
To: MarkLogic Developer Discussion
Subject: [MarkLogic Dev General] xdmp:value


Hi


I need to join the below items:


                           let $docText := fn:data($data/following-sibling::p)
                           let $x := fn:data(<CSA>[ ABC XYZ ]</CSA>)
                           let $str := '$x || $docText'
                           return xdmp:value($str)


This is giving error:

XDMP-ARGTYPE: (err:XPTY0004) $x || $docText -- arg1 is not of type 
xs:anyAtomicType?


Please let me know, how can this be achieved.


Thanks

Pragya

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

Reply via email to