commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ijorge <ijo...@ignos.com>
Subject Re: [JXPATH] Prefix on jxpath sentence when read DOM
Date Wed, 16 Feb 2005 10:14:36 GMT
Dmitri,

Yes, it is a problem. I think the XPath specification is too strict. 
But, I`m not sure if JXPATH should break with XPath specification.

Thanks,

ijorge


Dmitri Plotnikov wrote:

> ijorge,
>  
> I have been getting a bunch of requests for a change in this area.  The problem is that
I currently don't know what change to make without breaking the conformance to the XPath specification.
 See http://issues.apache.org/bugzilla/show_bug.cgi?id=32360
>  
> Please advise,
>  
> - Dmitri
> 
> ijorge <ijorge@ignos.com> wrote:
> I´m a question about the behavior of jxpath when read DOM with a 
> sentence without prefix. If I have this sentence:
> 
> context.getValue("$root/example1[@name="aa"]/example2");
> 
> This sentence don´t works because "example2" doesn´t have a prefix. My 
> jxpath code is generated automatically and I don´t know the prefix when 
> this code is generated.
> 
> I see these solutions:
> 1) not to change anything because prefix are necessary.
> 2) jxpath searches a empty prefix in the registered namespaces.
> 3) jxpath searches the default namespace in the ancestors.
> 4) 3) and 2).
> 
> I have changed the class 
> java/org/apache/commons/jxpath/ri/axes/SimplePathInterpreter.java, the 
> method getNodeIterator() and this change (solution 2) resolve my 
> problem. I comment on this situation because I think current behavior 
> should be changed.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message