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

Editing text

  • From: Peter Murray-Rust <peter@u...>
  • To: xml-dev@i...
  • Date: Fri, 28 Nov 1997 02:45:41

editing text
I am writing an editor for JUMBO where I expect most of the characters like
'"<>& to have been converted into entities (e.g. &apos, etc.). [I do not
expect any raw <![CDATA[ sections in the text - they will have been
transformed by the parser. On the other hand there may be other entities
which have not been expanded (e.g. &foo;

My understanding of the spec [71] is that an entity is a Name and that Names
[4], [5] and [6] are constructed from letters, digits and numbers. In
determining whether something is an entity, I have to look for a string of
the form: '&'(Letter | '_' | ':') (NameChar)* ';'
NameChars are Digits, MiscNames and Letters.

Appendix B lists six and a half pages of potential NameChars for which
JUMBO has to test - is this correct? If so I have code of the form:

public boolean isNameChar(char ch) {
    return <six pages of conditionals>;
}

I assume there is no short cut...
I applaud the work of the WG on the Internationalisation and I don't want
to detract from it. What I would suggest is that because of the extremely
likelihood of error if individuals do try to hack their own isNameChar(),
and because if ever this list is revised software will be invalidated, that
the WG, or W3C or whoever, maintain an isNameChar() routine in the common
languages 
(C, C++, Java) so that we know we shall all be working with the same one.

There may be other similar aspects of the spec where it is worth having a
central curated resource...

	P.

 
Peter Murray-Rust, Director Virtual School of Molecular Sciences, domestic
net connection
VSMS http://www.nottingham.ac.uk/vsms, Virtual Hyperglossary
http://www.venus.co.uk/vhg

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i...
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@i... the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@i... the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto: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.