What happened here is that in order to improve conformance with JAXP interfaces, I created a clearer split between the net.sf.saxon.xpath package, which is designed to implement the JAXP 1.3 XPath API, and net.sf.saxon.sxpath, which provides Saxon's "proprietary" API . The latter has two advantages: (a) it's geared towards XPath 2.0 rather than XPath 1.0, and (b) it doesn't require JAXP 1.3, and therefore runs on JDK 1.4 "out of the box".
 
If you're running on JDK 1.4 and don't want to install JAXP 1.3, then you shouldn't be using anything in the net.sf.saxon.xpath package. The class you should be using in place of the old StandaloneContext is net.sf.saxon.sxpath.IndependentContext. This has the declareNamespace() method to define namespaces in the static context.
 
Regards,
 
Michael Kay
http://www.saxonica.com/


From: saxon-help-bounces@lists.sourceforge.net [mailto:saxon-help-bounces@lists.sourceforge.net] On Behalf Of Maxime Leau
Sent: 03 April 2007 10:23
To: saxon-help@lists.sourceforge.net
Subject: [saxon] Saxon 8.8 vs Saxon 8.9,problem with declareNamespace in JAXPXPathStaticContext


    Hello,

    Adapting Java code using Saxon, from Saxon 8.8 to Saxon 8.9, I'm surprised to find the new
net.sf.saxon.xpath.StandaloneContext implementation (now net.sf.saxon.xpath.JAXPXPathStaticContext ).
    While Saxon8.8
StandaloneContext class let us declare namespaces through declareNamespace methods, Saxon8.9 JAXPXPathStaticContext class only provide a setNamespacesContext method using javax.xml.namespace.NamespaceContext. But javax.xml.namespace.NamespaceContext is a Java 1.5 class.
    My questions are:
    Thanks for your help,
LEAU Maxime.
-- 
###################################
# Leau Maxime                     #
# TÚl: +33 (0)2 4122 4096         #
# Email: maxime.leau@graphane.com #
# Web : www.graphane.com          #
###################################