|
[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message] Function Copy errorByomokesh Sahoo sahoo.byomokesh at gmail.comMon Feb 8 17:43:42 PST 2010
Hi,
I want split the one xml to multiple xml file using xquery. But it showing
error function copy. Please see the below code and give some point out.
XML
<root>
<row>
<Term>Hi</Term>
<Definition>An informal short greeting.</Definition>
</row>
<row>
<Term>Hello</Term>
<Definition>A more formal greeting.</Definition>
</row>
</root>
let $input-document := 'splitfile.xml'
let $collection := 'file///D:/temp'
for $term-data in doc($input-document)/root/row
let $term-name := $term-data/Term/text()
let $documentname := concat($term-name, '.xml')
let $store-return := copy($collection, $documentname, $term-data)
return
<store-result>
<store>{$term-name}</store>
<documentname>{$documentname}</documentname>
</store-result>
I am using saxon 9.2
Thanks
Byomokesh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20100208/d21cecb4/attachment.htm
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








