|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Re: [Sax-devel] Showstopper issue with new Attribute text
jcowan@r... wrote, > What's important, IMHO, is that all namespace attributes use the > magic namespace name so that it's easy to uniformly ignore them. Agreed. > > Returning null could break a lot of perfectly reasonable code. The > > empty string (or maybe even a non-empty but non-NCName string like > > "*") would be a better choice. > > I agree that the empty string is the Right Thing. Hmm ... how about Less Wrong ;-) I'm slightly worried that there might be code which assumes (not unreasonably) that, attrs.getLocalName(0).length() > 0 hence that, eg., attrs.getLocalName(0).charAt(0) can't fail, or that, foo.startsWith(attrs.getLocalName(0)) won't be true for all values of foo. Using "xmlns" for the local part (ie. option c) fixes this, but could be misinterpreted as a vanilla NCName. Something like "*" wouldn't have that problem (which isn't to say that it wouldn't have other worse problems). Cheers, Miles
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||

Cart








