[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Character classification

  • From: Andrew Layman <andrewl@m...>
  • To: xml-dev@i...
  • Date: Wed, 3 Sep 1997 13:39:48 -0700

RE: Character classification
JDK 1.1 is still broken for Unicode.  Take a look at the code in the
Microsoft XML Parser (http://www.microsoft.com/standards/xml) to see our
work-arounds.

--Andrew Layman
   AndrewL@m...

> -----Original Message-----
> From:	Tim Bray [SMTP:tbray@t...]
> Sent:	Wednesday, September 03, 1997 12:51 PM
> To:	xml-dev@i...
> Subject:	Character classification
> 
> I've been working on making Lark really do Unicode.  JDK 1.1 is
> supposed
> to have, unlike 1.0, a usable input method; thus the problem is to
> check,
> when you're reading a GI or Attribute name, whether the characters are
> legal namestart/name characters.
> 
> It turns out to be quite a lot of work, so this is an offer to share.
> I wrote a program (based on Lark) that pulls the relevant character
> classes out of the XML spec, picks apart the markup, and writes
> another
> Java class that has some static arrays and offers two methods:
> 
> package textuality.lark;
> public class CharClasses
> {
>  public static boolean isNameC(char c)
>  public static boolean isNameStart(char c)
> }
> 
> It needs about 4k of tables (which it binary-searches); it might be
> faster
> with 128k of byte-addressable tables or 16K of bitmaps, neither of
> which
> would be hard to implement.
> 
> (a) is this a waste of time, i.e. are there Unicode library calls that
>     do it?
> (b) if not, has everyone else already done this?
> (c) if not, if I'm going to publish this, is the API above OK?
> 
> I've attached the current Java source file for those who find the 
> explanation above insufficiently clear.
> 
> Cheers, Tim Bray
> tbray@t... http://www.textuality.com/ +1-604-708-9592 <<
> File: CharClasses.java.txt >> 

xml-dev: A list for W3C XML Developers
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To unsubscribe, send to majordomo@i... the following message;
unsubscribe xml-dev
List coordinator, Henry Rzepa (rzepa@i...)


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.