[Mono-list] Re: XmlNamespaceManager.LookupPrefix
ginga@kit.hi-ho.ne.jp
ginga@kit.hi-ho.ne.jp
Sun, 19 Jan 2003 16:05:19 +0900
--------_3E2A46D9146C0793F530_MULTIPART_MIXED_
Content-Type: text/plain; charset="US-ASCII"
Content-Transfer-Encoding: 7bit
Hello,
> For now, lets assume that the bug is in the documentation, so lets move
> closer to the .NET behavior, and submit the bug to ECMA/Microsoft so
> they can fix their docs.
About this topic, I made contact with DotGNU developers ML.
Gopal V, one of the developer, said that it would be better
to wait until the next revision of ECMA is released.
I think it is better choice. Miguel, how do you think?
Related to this, I found another ECMA or MS bug in
XmlTextWriter.LookupPrefix. If prefix was not found, then
- Mono ==> null
- MS (both document and implementation) ==> null
- ECMA spec. ==> String.Empty.
- pnetlib ==> String.Empty
- OCL ==> null
Moreover, XmlNode.GetPrefixOfNamespace(uri) returns String.Empty.
(MS document has no hints) ... I'm totally confused ;-(
Now I have completed (I hope so) those modification. I attached.
It was a bit complicated and might have another bugs.
(At least, no failures are found with my environment.)
I also checked with Sebastien's System.Security testcases.
I assume many failure are cleared.
Thanks,
-- Atsushi Eno
--------_3E2A46D9146C0793F530_MULTIPART_MIXED_
Content-Type: application/octet-stream; name="XML.diff"
Content-Disposition: attachment;
filename="XML.diff"
Content-Transfer-Encoding: base64
SW5kZXg6IFN5c3RlbS5YbWwvWG1sRWxlbWVudC5jcwo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ClJDUyBmaWxlOiAvbW9u
by9tY3MvY2xhc3MvU3lzdGVtLlhNTC9TeXN0ZW0uWG1sL1htbEVsZW1lbnQuY3MsdgpyZXRyaWV2
aW5nIHJldmlzaW9uIDEuNDYKZGlmZiAtdSAtcjEuNDYgWG1sRWxlbWVudC5jcwotLS0gU3lzdGVt
LlhtbC9YbWxFbGVtZW50LmNzCTEwIEphbiAyMDAzIDE4OjUwOjM5IC0wMDAwCTEuNDYKKysr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