commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niall Pemberton (JIRA)" <j...@apache.org>
Subject [jira] Commented: (JXPATH-61) [jxpath] Default Namespace not handled correctly
Date Fri, 05 Jan 2007 04:54:27 GMT

    [ https://issues.apache.org/jira/browse/JXPATH-61?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12462404
] 

Niall Pemberton commented on JXPATH-61:
---------------------------------------

http://svn.apache.org/viewvc?view=rev&revision=329468
http://svn.apache.org/viewvc?view=rev&revision=329964

> [jxpath] Default Namespace not handled correctly
> ------------------------------------------------
>
>                 Key: JXPATH-61
>                 URL: https://issues.apache.org/jira/browse/JXPATH-61
>             Project: Commons JXPath
>          Issue Type: Improvement
>    Affects Versions: 1.2 Final
>         Environment: Operating System: All
> Platform: All
>            Reporter: Richard Unger
>            Priority: Minor
>             Fix For: 1.3
>
>
> JXPath 1.2 does not handle the default namespace correctly. There is no way to
> set the default namespace on a context, so xpath expressions with unprefixed
> node-selections do not match the default namespace.
> Eg:
> <?xml version="1.0" encoding="iso-8859-1"?>
> <test xmlns="http://test">
>   <child-element />
> </test>
> This is valid xml, with default namespace 'http://test'
> If the following xpath expression is used: '/test/childelement', it will not
> match the child-element element in this xml file.
> There appears to be no way to use the function JXPathContext.registerNamespace()
> to associate a default namespace with the context.
> The programmer is forced to introduce a namespace prefix for JXPath, the xpath
> expression 'foo:test/foo:child-element' will correctly match the element if 
> JXPathContext.registerNamespace("foo","http://test") is called first.
> This is, IMHO, a bug.

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

        

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


Mime
View raw message