From: OC <one...@ya...> - 2005-11-03 07:51:32
|
Hi Pierrick >>You're mixing a *variable binding* (let $test9 := ...) with *element >>constructors* (...). This >>is a *syntax* error, not even a logical one... >>Your variable must be bound at the same level than the $xupdate variable >>binding and, since your will *reference* it when you construct your >>document (with curly braces), you have to bind it before $xupdate. I tried what you suggested. but this doesnt work. the gist of this problem is - i am trying to pass a variable to Xupdate:append select .... as the filename/nodename where it should go and append data. <xupdate:append select="doc('$test9')/xml"> But it seems that XUpdate does not expand the variable at runtime so I end up with blank files. Is there anyway I can make updations using Xupdate to a file whose name i get as request:request-parameter from the user at runtime in a collection? I will be very grateful to get any ides on this. Thanks and Regards Titash Pierrick Brihaye <pie...@cu...> wrote: Hi, [message "reformated" in raw text] OC wrote: > (: Create an XUpdate document :) > > let $xupdate := > > > xmlns:xupdate="http://www.xmldb.org/xupdate" > > > (: populate the xml structure within the file :) > > let $test9:= doc(concat( > "/db/lab/",$fname,".xml")) > > > select="$test9/xml"> > > > {$chunk} > ...... > > > > This does not work. It gives me an $test9 is not bound XMLDB Excpetion. You're mixing a *variable binding* (let $test9 := ...) with *element constructors* (...). This is a *syntax* error, not even a logical one... Your variable must be bound at the same level than the $xupdate variable binding and, since your will *reference* it when you construct your document (with curly braces), you have to bind it before $xupdate. You should then have a correct XUpdate document. Please, check it. Then (and only then)... you probably want this XUpdate to be "executed" against the database. Just use the xmldb:update built-in function or create your own module if you want to ease parameters passing. Cheers, -- Pierrick Brihaye, informaticien Service régional de l'Inventaire / DRAC Bretagne mailto:pie...@cu... / tél : +33 (0)2 99 29 67 78 http://usenet-fr.news.eu.org/fr-chartes/rfc1855.html. L'avez-vous lu ? ------------------------------------------------------- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php _______________________________________________ Exist-open mailing list Exi...@li... https://lists.sourceforge.net/lists/listinfo/exist-open Cherish your visions and your dreams as they are the children of your soul; the blue prints of your ultimate achievements. (Onericus Criticus - the interpreter of Dreams) --------------------------------- Yahoo! FareChase - Search multiple travel sites in one click. |