xml-xmlbeans-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cezar Andrei" <ce...@bea.com>
Subject RE: xpath with namespace syntax. query returns no results.
Date Mon, 14 Jun 2004 20:23:54 GMT
Michael,

The current Jaxen implementation ( 1.1 beta2 ) does not support the declare namespace syntax,
it does only provide an API to set up a namespace context which currently is not exposed in
XmlBeans. We should probably expose it through XmlOptions.

Cezar

> -----Original Message-----
> From: Michael Lancaster [mailto:m.lancaster@ph.unimelb.edu.au]
> Sent: Sunday, June 13, 2004 8:47 AM
> To: xmlbeans-user@xml.apache.org
> Subject: xpath with namespace syntax. query returns no results.
> 
> 
> hello,
> 
> i have been having difficulty performing a relatively simple xpath 
> query;
> 
> <?xml version="1.0"?>
> <foo xmlns="http://somenamespace.com/" />
> 
> query= "declare namespace x='http://somenamespace.com/' /x:foo[1]"
> fails
> 
> query= "/x:foo[1]"
> succeds if no namespace defined...
> 
> query= "declare namespace x='http://somenamespace.com/' /x:foo"
> succeeds
> 
> the combination of namespace *and* a predicate seems to make 
> the query 
> fail.
> 
> i suspect that this is caused by the fact that when xmlbeans 
> detects a 
> predicate, it classes the xpath query as 'complex' and passes it to 
> jaxen. this is all fine, but because i have been using the syntax as 
> described in the javadoc:
> 
> "declare namespace x='http://somenamespace.com/' /x:foo[1]"
> 
> i think that jaxen does not understand this syntax...
> 
> how do i tell jaxen about my namespace, in such a way that simple 
> queries will not fail when they are parsed by xmlbeans and 
> *not* passed 
> to jaxen?
> 
> thanks in advance,
> 
> michael 
> 
> 
> - 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:   xmlbeans-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: xmlbeans-user-help@xml.apache.org
> Apache XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/
> 
> 

- ---------------------------------------------------------------------
To unsubscribe, e-mail:   xmlbeans-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xmlbeans-user-help@xml.apache.org
Apache XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/


Mime
View raw message