Can you elaborate on what you're trying to do? The XmlOptions.SAVE_SUGGESTED_PREFIXES option is not meant for use with XPath evaluation...If you send a small repro of your evaluation code, I can try to see what's happening.
I suspect that your usage is incorrect: namespaces need to be declared in the XPath expression in order to be detected (in an XQuery style prolog) -- please see the samples or the test cases included in the source distribution. If you have the correct syntax and it's still not working, then it's a bug. -----Original Message----- From: Marius Gleeson [mailto:[EMAIL PROTECTED] Sent: Sunday, May 22, 2005 4:38 PM To: dev@xmlbeans.apache.org Subject: namespaces with xpath evaluation I am trying to use the selectNodes functionality and have found that namespaces are not being passed through to the saxon xpath evaluator. Basically the code when creating the saxon evaluator does not pass any supplied namespaces from the options into the evaluator. This can be seen in src/store/org/apache/xmlbeans/impl/store/Path.java : around line 92 static synchronized Path getCompiledPath(String pathExpr, int force, String currentVar) { Path path = null; Map namespaces = (force & USE_SAXON) != 0 ? new HashMap() : null; <--- just an empty hashmap if ((force & USE_XBEAN) != 0) As i need this functionality I have editied my local copy so that it looks like static synchronized Path getCompiledPath(String pathExpr, int force, String currentVar,XmlOptions options) { Path path = null; Map namespaces = null; if ((options != null) && (options.hasOption(XmlOptions.SAVE_SUGGESTED_PREFIXES)) ) { namespaces = (Map) options.get(XmlOptions.SAVE_SUGGESTED_PREFIXES); } else { namespaces = (force & USE_SAXON) != 0 ? new HashMap() : null; } Is there any other way I should be doing this, if not will this ability be in the main branch soon, and does anyone know why the jaxen functionality was dropped, but still works it you instantiate the classes externally? Cheers, Marius Gleeson -- Marius Gleeson [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]