From: Patrick B. <pat...@jo...> - 2011-03-09 21:07:20
|
Hi all, I'm looking to use... myModule.declareVariable(*QName*, *Document or Node*); ...so I can set up a variable under my modules namespace that contains an in memory chuck of XML that can then be accessed from an XQuery. How would I do this? Here are a couple of the things I've tried: ElementImpl _node = new ElementImpl(new QName("myname", MyModule.NAMESPACE_URI)); myModule.declareVariable(*QName*, _node); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ElementImpl _node = new ElementImpl(new QName("myname", MyModule.NAMESPACE_URI)); NodeProxy _proxy = new NodeProxy(_node); myModule.declareVariable(*QName*, NodeProxy); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ DocumentImpl _doc = new DocumentImpl(BrokerPool.getInstance()); _doc.appendChild((ElementImpl)_doc.createElement("myname")); myModule.declareVariable(*QName*, _doc); Thoughts? Thanks! -- Patrick Bosek Jorsek Software Cell (585) 820 9634 Office (585) 239 6060 Jorsek.com |