You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by James Melton <ja...@cylogix.com> on 2001/03/27 23:20:19 UTC

Question Re: [Bug 1110] New - XPath module returns a curious result

I have looked into the W3 docs on XML and and XPath but can't convince
myself of the right way to evaluate this XPath, (//.)[self::e1]  Is it
legitimate?

This bug does not appear if you use (//)[self::e1]  and an error results
from //.[self::e1]  Both of those results make sense to me. 

On the stranger side, there appears to be no problem getting the
anticipated result from the original XPath if you exclude the document's
DTD. Of course I can't tell what the DTD implies as written. It doesn't
seem to say anything about the structure of the document.

Any ideas?

Jim.

bugzilla@apache.org wrote:

> + "<!DOCTYPE doc []>\n"
> + +"<doc>\n"
> + +"   <e1>\n"
> + +"      <e2/>\n"
> + +"   </e1>\n"
> + +"</doc>\n"

> +         XObject xobj = XPathAPI.eval(doc, "(//.)[self::e1]");

____________________________________________________________
James Melton                 CyLogix
609.750.5190                 609.750.5100
james.melton@cylogix.com     www.cylogix.com