Ivan :
I tried to use the variable binding of the Java Api, but it didn't
work for the $data part (but $doc and $collection didnt't cause
any problem):
String query = "declare variable $collection external; declare
variable $doc external; declare variable $data external; UPDATE
INSERT $data INTO doc($doc, $collection)"
expression.bindString("data", "<test>test</test>", null);
expression.bindString("doc", "test", null);
expression.bindString("collection", "test", null);
--> doesn't work
Please, send me event log (SEDNA_HOME/data/event.log) after executing
this query.
I think the interesting part of the log is this:
--- declare variable $data as item()* := xs:string("<user>test</user>");declare variable $doc as
xs:string := xs:string("anton");declare variable $collection as xs:string :=
xs:string("users");UPDATE INSERT $data INTO doc($doc, $collection)
ERROR 02/02/2010 16:17:50 (TRN ehrflex pid=3056 sid=49 trid=49)
[insertions.cpp:insert_to:593]: (SE2015) Invalid result of the first insert
argument: sequence contains atomic values
The Code which produced this log is:
String query = "declare variable $data external;declare variable $doc as xs:string
external;declare variable $collection as xs:string external;UPDATE INSERT $data INTO
doc($doc, $collection)";
xqe.bindString(new QName("data"),"<user>test</user>", null);
xqe.bindString(new QName("doc"),"anton", null);
xqe.bindString(new QName("collection"),"users", null);
xqe.executeCommand(query);
Seems I have to use AtomicValue somehow, unfortunatelly I tried several
ways without sucess.
Another problem occured after I cut the <? xml... part . i have to
UPDATE INSERT a very long xml definition that I have as a String. sedna
tells me that my construct is bigger than the maximum size. Is this
somehow configureable or should I create a file and LOAD it into Sedna?
Best regards and thank you for investing time.
Anton
--
Anton Brass
Institute for Biological and Medical Imaging - MEDIS
Phone: +49 89-3187-4181
*Helmholtz Zentrum München
German Research Center for Environmental Health (GmbH)*
Ingolstaedter Landstr. 1
D-85764 Neuherberg, Germany
_www.helmholtz-muenchen.de <http://www.helmholtz-muenchen.de/>_
Chairman of Supervisory Board: MinDir Dr. Peter Lange
Board of Directors: Prof. Dr. Günther Wess and Dr. Nikolaus Blum
Registergericht: Register of Societies: Amtsgericht München HRB 6466
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Sedna-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sedna-discussion