[jdom-interest] Enhancement: make internal isXML* methods in
Verifier public
Wolfgang.Frech at xenium.de
Wolfgang.Frech at xenium.de
Thu Aug 19 00:01:08 PDT 2004
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.
--
Wolfgang Frech
Xenium AG www.xenium.de
Excellence in information management
Elektrastraße 6a, 81925 München
Tel +49 - (0) 89 - 42 07 98 - 29, Fax - 40
Mobil +49 - (0) 1 78 - 7 82 64 26
More information about the jdom-interest
mailing list