Re: [bdbxml] Passing a list to XmlQueryContext::setVariableValue

John Snelson <[email protected]> Wed, 24 Aug 2005 10:00:24 +0100
Newsgroups gmane.comp.db.dbxml.general
Message-ID <[email protected]>
This is not currently possible using the C++ API, but it is something 
that we are looking at implementing. Would this be of use to you?

You can work around this restriction by doing this:

declare variable $a as xs:string external;
declare variable $b as xs:string external;
declare variable $dtToGet as xs:string* := ($a, $b);

...

And then set variables "a" and "b" in the XmlQueryContext.

I hope this helps,

John

John Ralls wrote:
> If, from within the dbxml shell, I declare a variable like so:
> declare variable $dtToGet as xs:string* := ('Objective', 'Search');
> I can then use that variable in a general equality [local-name() =  
> $dtToGet] and it works just fine.
> I want to do the same thing in C++.  I naively tried to pass the list  
> as a string:
> context.setVariableValue("dtToGet", "('Objective', 'Search')");
> The query doesn't work.
> (If I pass a single arg to it, eg setVariableValue("dtToGet",  
> "Objective"), it does work.)
> 
> Is there a way to construct an XmlValue that will get turned into a  
> list for submission to XQuery?
> 
> Regards,
> John Ralls
> 
> 
> 
> ------------------------------------------
> To remove yourself from this list, send an
> email to [email protected]
> 


-- 
John Snelson, Berkeley DB XML Engineer
Sleepycat Software, Inc
http://www.sleepycat.com

Contracted to Sleepycat through Parthenon Computing Ltd
http://blog.parthcomp.com/dbxml


------------------------------------------
To remove yourself from this list, send an
email to [email protected]