>From your error it looks like (/sam/126683.xml) either has two /book/title elements or, the title looks something like this:
<title> Some text <an-element>maybe some text here</an-element> some more text </title> Which will cause text to return 2 text nodes, causing fn:normalize-space to receive a sequence of strings, instead of a single string as it's expecting. A few things that may help with this is using fn:data instead of text() or using string-join to stitch the text nodes together with a space. You'll have to decide what best fits your needs. -fs From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Vikash Ranjan Sent: Wednesday, September 03, 2008 3:11 AM To: General Mark Logic Developer Discussion Subject: [MarkLogic Dev General] sub: file error Hello, I have uploaded 50 XML files on the Marklogic DB and the script is working fine, but if I upload one more file (say 51st file) then it shows some application error. What might be the problem or what do i need to change in the script? I would like to get some suggestion regarding this. Thanks. Error Message : XDMP-ARGTYPE: normalize-space((doc("/sam/126683.xml")/book/title/text()[1], doc("/sam/126683.xml")/book/title/text()[2])) -- arg1 is not of type xs:string? Script : define function chapno ($str as xs:string) { for $x in xdmp:directory("/sam/") where normalize-space($x/book/title/text()) eq $str order by $x/[EMAIL PROTECTED] ascending return let $y := $x/book/title/@id return $y } chapno("INTRODUCTION")
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ General mailing list [email protected] http://xqzone.com/mailman/listinfo/general
