[ http://issues.apache.org/jira/browse/XALANJ-1790?page=all ]

Brian Minchau updated XALANJ-1790:
----------------------------------

    Version: Latest Development Code
                 (was: 2.0.0)

> XPath ignores namespace declarations except on root element
> -----------------------------------------------------------
>
>          Key: XALANJ-1790
>          URL: http://issues.apache.org/jira/browse/XALANJ-1790
>      Project: XalanJ2
>         Type: Bug
>   Components: XPath
>     Versions: Latest Development Code
>  Environment: Operating System: Windows NT/2K
> Platform: PC
>     Reporter: Guy Rixon
>     Assignee: Xalan Developers Mailing List

>
> By my reading of the XML standards, this document should be valid:
> <?xml version="1.0"?>
> <foo:Foo xmlns:foo="http://foo.com";>
>   <bar:Bar  xmlns:bar="http://bar.com"/>
> </foo:Foo>
> and I should be able to search for //bar:Bar using the XPath implementation 
> in 
> Xalan. However, if I make that search using the ApplyXPath sample, then I get 
> a 
> javax.xml.transformer.Exception saying "Prefix must resolve to a namespace: 
> bar".
> If I change the XML to this:
> <?xml version="1.0"?>
> <foo:Foo xmlns:foo="http://foo.com";
>          xmlns:bar="http://bar.com";>
>   <bar:Bar  xmlns:bar="http://bar.com"/>
> </foo:Foo>
> then the search works.  In the original XML above, I can search for 
> //foo:Foo, 
> but if I wrap the whole structure in a <baz>...</baz> then the search for 
> fooFoo 
> fails.
> This is v2.5.2, BTW. Your menu of versions in Bugzilla doesn't have that one.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to