[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

  • To: xml-dev@l...
  • Subject: Re: Re: [Sax-devel] Showstopper issue with new Attribute text
  • From: Miles Sabin <miles@m...>
  • Date: Wed, 17 Mar 2004 21:12:41 +0000
  • In-reply-to: <20040317204435.GI29558@s...>
  • References: <OF24BFF179.96E54E23-ON85256E54.0050C5B0-85256E54.0051D5E1@c...> <200403171940.42291.miles@m...> <20040317204435.GI29558@s...>
  • Sender: Miles Sabin <miles@m...>
  • User-agent: KMail/1.6

xpath 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!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.