[jdom-commits] CVS Update: jdom/src/java/org/jdom

Jason Hunter jhunter at servlets.com
Tue Aug 31 14:58:55 PDT 2004


****************************************
Date:   Tue Aug 31, 2004 @14:58:55 PDT
Author: 

Update of /home/cvs/jdom/src/java/org/jdom
In directory servlets:/tmp/cvs-serv895

Modified Files:
Verifier.java
Log Message:
Changing the Verifier.isXXX() methods from private to public.
Wolfgang Frech argued effectively for this change:

--
Subject: [jdom-interest] Enhancement: make internal isXML* methods in Verifier public
From: Wolfgang.FrechATxenium.de
Date: Thu, 19 Aug 2004 09:01:08 +0200
To: jdom-interest at jdom.org

Request for Enhancement

Make the internal XML character test methods of the class Verifier public.
A list of these methods is given below.


Rationale

The character test methods are a valuable implementation of a tedious
detail of the XML recommendation. They could be used for additional
purposes if made public.
On the other hand, making these methods public does not expose an
implementation detail that is likely to be changed. The character test
methods have a clear and stable definition. They will not change except by
a revision of the XML recommendation itself.


Example for Additional Usage: Name Token

To test if an attribute value is a XML name token (production [7]), one
could use the method isXMLNameCharacter (productions [4]).
A workaround is to check if the value is not empty, prepend an underscore
and use checkXMLName. Other workarounds would require to copy or patch
JDOM code.


Details

The class org.jdom.Verifier uses the following methods internally:

isXMLCharacter
isXMLNameCharacter
isXMLNameStartCharacter
isXMLLetterOrDigit
isXMLLetter
isXMLCombiningChar
isXMLExtender
isXMLDigit
isXMLPublicIDCharacter
isHexDigit
isURICharacter

The methods isHexDigit and isURICharacter are XML character test methods as
well, because they implement productions of the XML recommendation.
All these methods should be made public.
--

-jh-

===================================================================
File: no file Verifier.java		Status: Needs Checkout

   Working revision:	1.51	Tue Aug 31 21:58:55 2004
   Repository revision:	1.51	/home/cvs/jdom/src/java/org/jdom/Verifier.java,v

   Existing Tags:
	BEFORE_UNCHECKED         	(revision: 1.49)
	jdom_1_0_b10             	(revision: 1.49)
	jdom_1_0_b10_rc1         	(revision: 1.49)
	after_rolf               	(revision: 1.48)
	before_rolf              	(revision: 1.48)
	jdom_1_0_b9              	(revision: 1.44)
	jdom_1_0_b8              	(revision: 1.32)
	jdom_prefilter           	(revision: 1.23)
	jdom_1_0_b7              	(revision: 1.23)
	jdom_1_0_b6              	(revision: 1.19)
	start                    	(revision: 1.1.1.1)
	jdom                     	(branch: 1.1.1)




More information about the jdom-commits mailing list