#857 s9api XQuery setting default namespace

v9.1
closed
Michael Kay
s9api API (27)
5
2012-10-08
2008-08-06
Michael Kay
No

The API documentation for XQueryCompiler.declareNamespace() says that if the prefix is a zero-length string, the call has the effect of setting the default namespace for elements and types. However, it has no effect.

The same problem affects the underlying interface StaticQueryContext.declareNamespace().

A patch will be committed to Subversion on both the the 9.0 and 9.1 branches. Affects module StaticQueryContext. JUnit test added: TestXQueryCompiler.testDefaultNamespace().

Discussion

  • Michael Kay
    Michael Kay
    2008-08-08

    Logged In: YES
    user_id=251681
    Originator: YES

    The patch unfortunately has side-effects: it means that the default namespace will sometimes be set to null rather than to "" (zero length string), which causes some internal operations to fail with an NPE. A revised version of the patch is being committed.

     
  • Michael Kay
    Michael Kay
    2008-09-02

    Logged In: YES
    user_id=251681
    Originator: YES

    Fixed in 9.0.0.8 and 9.1.0.2