OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: String interning (WAS: SAX2/Java: Towards a final form)

[ Lists Home | Date Index | Thread Index ]
  • From: David Brownell <david-b@pacbell.net>
  • To: Miles Sabin <msabin@cromwellmedia.co.uk>
  • Date: Fri, 14 Jan 2000 12:34:53 -0800

Miles Sabin wrote:
> 
> David Brownell wrote,
> > Nope -- I want to see it _exposed_ but not mandated.  It's
> > actually OK if parsers do this only for their own benefit,
> > but it's more useful if apps can tell when it's being done.
> 
> OK, how does that pan out? Querying for String.intern() support
> via a getFeature() call? That'd work, but you need to spell it
> out a bit more, because the naive way of taking advantage of
> interning in a ContentHandler looks disgusting,
> 
>   if(hasInterning)
>   {
>     ...
>   }
>   else
>   {
>     ...
>   }

I had in mind more like

    if (!hasInterning)
	throw new ConfigurationError ("get me a different parser");

For apps that don't care, they won't check the feature.  For
those that do care, getting a parser that's not correctly
featured would be just another class of configuration bug.

- Dave

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ or CD-ROM/ISBN 981-02-3594-1
Please note: New list subscriptions now closed in preparation for transfer to OASIS.






 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS