Bug in XQueryCompiler.declareNamespace ?
Added by Anonymous over 16 years ago
Legacy ID: #5148861 Legacy Poster: muriloq (muriloq)
The javadoc of the method declareNamespace of class net.sf.saxon.s9api.XQueryCompiler says If the [namespace prefix] is a zero-length string, this method sets the default namespace for elements and types. So I assumed that calling xqCompiler.declareNamespace("", "http://www.w3.org/1999/xhtml"); would be equivalent to adding the line below to my XQuery: declare default element namespace "http://www.w3.org/1999/xhtml"; However, it doesn't work: no elements of the namespace match). Am I missing something or I found a bug ? Thanks a lot in advance!
Replies (2)
RE: Bug in XQueryCompiler.declareNamespace ? - Added by Anonymous over 16 years ago
Legacy ID: #5149750 Legacy Poster: Michael Kay (mhkay)
You are right, there is a bug here. Thanks for reporting it. I've raised a patch in Subversion on both the 9.0 and 9.1 branches. Unfortunately there's no easy workaround because the XQueryCompiler doesn't allow you to drop down into the lower-level (non-s9api) objects underneath. Michael Kay Saxonica
RE: Bug in XQueryCompiler.declareNamespace ? - Added by Anonymous over 16 years ago
Legacy ID: #5150027 Legacy Poster: muriloq (muriloq)
Thanks a lot for the quick response. For now I'll simply declare the default namespace in the XQuery itself - it's no big deal. Best regards, and keep up the excellent work! Murilo Q.
Please register to reply