dotgnu-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [DotGNU]XmlNamespaceManager.LookupPrefix


From: Gopal V
Subject: Re: [DotGNU]XmlNamespaceManager.LookupPrefix
Date: Sat, 18 Jan 2003 21:14:06 +0530
User-agent: Mutt/1.2.5i

If memory serves me right, ginga(A.E.) wrote:
> Currently both DotGNU and Mono are implemented conforming to
> ECMA specification. But if possible, I think it is good for both
> of us to change its implementation way.

Ok, I think changing it would be better after the second revision
of ECMA is released ... Hopefully the second version should clear
up other quirks like the Read() thing Adam was talking about ...

> So if you decided to conform to ECMA spec, then it should be like:
> 
>   string prefix = namespaceManager.LookupPrefix(ns);
>   return prefix == String.Empty ? null : prefix;

<ECMA>

A String containing the corresponding prefix, or System.String.Empty if 
the prefix is not found and ns is the default namespace, or null
if no matching namespace URI is found in the current scope.

</ECMA>

is what I found in ECMA ... which means XmlTextWriter.LookupPrefix needs
to check for default namespace as well ? ... Anyway so the code now stands
as above with the Empty checks , so that we can get away with reference
comparisons for the return values ...

But I'm not the Xml guy around here, so I am not sure ... Adam , if you 
see any problem with this, please check out the fix. 

Thanks,

Gopal
-- 
The difference between insanity and genius is measured by success


reply via email to

[Prev in Thread] Current Thread [Next in Thread]