[jdom-interest] Verifier

Harry Evans harry at pws.ws
Thu Apr 4 11:00:27 PST 2002


My mistake.  I thought, without actually having checked, that the
Character.Subset was introduced in 1.1 .  I understand the need for 1.1
compatibility, so please disregard this point.

Harry Evans

> -----Original Message-----
> From: jdom-interest-admin at jdom.org
> [mailto:jdom-interest-admin at jdom.org]On Behalf Of Elliotte
> Rusty Harold
> Sent: Thursday, April 04, 2002 5:19 AM
> To: Jason Hunter; Harry Evans
> Cc: jdom-interest at jdom.org
> Subject: Re: [jdom-interest] Verifier
>
>
> At 5:18 PM -0800 4/1/02, Jason Hunter wrote:
>
>
> >>  1.  Unless there is some reason anyone can see against
> it, I think most of
> >>  the methods in Verifier, such as isXMLLetter, isXMLDigit, and
> >>  isXMLCombiningChar, should be using the Character.Subset
> interface defined
> >>  in java.lang, as this is the standard way to define
> ranges of characters for
> >>  Java.  This won't help performance (shouldn't really hurt
> it either), but it
> >>  will make it a bit more standard.
> >
> >I'd be interested in hearing Elliotte's thoughts on this.
> Lacking his
> >commentary, I personally think it's better to match the XML spec
> >explicitly than to rely on Java's built-in behaviors.
> >
>
> We could define our own subclasses of Character.Subset that matched
> XML's rules.  Since XML doesn't match Unicode exactly, we couldn't
> use the preexisting rules in the JDK as I think Jason originally
> pointed out over two years ago. (The original version of Verifier I
> wrote did use the Java methods.)
>
> I really don't think Character.Subset would gain us anything at all,
> and it would needlessly restrict us to Java 1.2 and later. I
> recommend staying with the current implementation. Is there some
> particular use-case you had in mind that would call for using
> Charcter.Subset?
> --
>
> +-----------------------+------------------------+-------------------+
> | Elliotte Rusty Harold | elharo at metalab.unc.edu | Writer/Programmer |
> +-----------------------+------------------------+-------------------+
> |          The XML Bible, 2nd Edition (Hungry Minds, 2001)           |
> |             http://www.cafeconleche.org/books/bible2/              |
> |   http://www.amazon.com/exec/obidos/ISBN=0764547607/cafeaulaitA/   |
> +----------------------------------+---------------------------------+
> |  Read Cafe au Lait for Java News:  http://www.cafeaulait.org/      |
> |  Read Cafe con Leche for XML News: http://www.cafeconleche.org/    |
> +----------------------------------+---------------------------------+
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/yo
uraddr at yourhost.com




More information about the jdom-interest mailing list