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

** 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.

  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";

  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:

Mailing list:
Post to     :
Unsubscribe :
More help   :

Reply via email to