Re: [PATCH] Teach xmerl_xpath to resolve context namespaces in more cases

Fredrik <[email protected]>
Newsgroups gmane.comp.lang.erlang.patches
Message-ID <[email protected]>
On 09/12/2013 06:52 PM, Daniel White wrote:
> These patches teach attribute name tests and node prefix (wildcard)
> name tests to behave like element name tests.
>
> Assuming the following document has been scanned with
> `{namespace_conformant, true}`:
>
> <root xmlns:ns1="http://www.example.com/ns">
>    <child ns1:attr="example" />
> </root>
>
> The current behaviour is as such:
>
>> [#xmlElement{}] = xmerl_xpath:string("/root/ns1:child", Doc).
>> [#xmlAttribute{}] = xmerl_xpath:string("/root/ns1:child/@ns1:attr", Doc).
>> [#xmlElement{}] = xmerl_xpath:string("/root/t:child", Doc,  [{namespace, [{"t", "http://www.example.com/ns"}]}]).
>> [] = xmerl_xpath:string("/root/t:child/@t:attr", Doc,  [{namespace, [{"t", "http://www.example.com/ns"}]}]).
> The latter case here is surprising, and should return the attribute as
> it can be resolved by the provided namespace.
>
>
> git fetch git://github.com/danielwhite/otp.git
> xmerl-xpath-resolve-context-namespaces
>
> https://github.com/danielwhite/otp/compare/xmerl-xpath-resolve-context-namespaces
> https://github.com/danielwhite/otp/compare/xmerl-xpath-resolve-context-namespaces.patch
>
> Cheers,
>
> --
> Daniel White
> _______________________________________________
> erlang-patches mailing list
> [email protected]
> http://erlang.org/mailman/listinfo/erlang-patches
Hello Daniel,
I've fetched your patch and assigned it to be reviewed by the 
responsible team.
Thanks,

-- 

BR Fredrik Gustafsson
Erlang OTP Team

_______________________________________________
erlang-patches mailing list
[email protected]
http://erlang.org/mailman/listinfo/erlang-patches
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.