This problem doesn't exist anymore because the API of the DynamicContext has changed. Since 2.0, the DynamicContext provides a function setContextItem(const Item& aItem). aItem can be an arbitrary item. For example, created by XmlDataManager::parseXML or DocumentManager::document.
** Changed in: zorba Status: New => Won't Fix -- You received this bug notification because you are a member of Zorba Coders, which is the registrant for Zorba. https://bugs.launchpad.net/bugs/867356 Title: replacing documents in the store Status in Zorba - The XQuery Processor: Won't Fix Bug description: The following feature request was filed by Mark Howe on zorba-users. I want to run large numbers of documents through my system. (Maybe this is unusual, ie maybe a more usual scenario is lots of queries on relatively slowly-changing sets of documents?) The problem I'm hitting is that I don't seem to be able replace a variable or a context with any given document name. My current workaround is zorba::DynamicContext* context = lQuery->getDynamicContext(); std::stringstream doc_name; doc_name << "in_" << query_counter++ << ".xml"; context->setContextItemAsDocument(doc_name.str(),lDocStream); ie I make sure that the context has a unique name every time. If I take out the ++ in the third line, subsequent calls of the code do not change the context from the document it was initially set to. Am I missing something obvious, eg do I need to remove the document manually before setting a new context, and, if so, how do I do this? To manage notifications about this bug go to: https://bugs.launchpad.net/zorba/+bug/867356/+subscriptions -- Mailing list: https://launchpad.net/~zorba-coders Post to : firstname.lastname@example.org Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp