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

ANN: Ents 0.2


rules for ents
All this discussion of character entities and references reminded me that 
these issues are genuinely aggravating, to say the least.  Aggravating 
issues tend to drive me to write code, so I did.

The result is a small package I'm calling Ents.  Ents is short for 
entities, in that this does less than entities, but the Tolkien connection 
is interesting as well.

Ents, like most of my filters, takes a list of rules in an XML format.  In 
this case, the rules define equivalences between character references and 
entity names.  The processor then uses a Java FilterReader to process a 
document, either replacing entity with references (to send to computers who 
don't care about entities) or references with names (more typically for 
humans).  The processing is reversible.

Ents comes with a rules file built from the entity declarations in 
Modularization of XHTML.  I left in the descriptions of the characters, but 
they do nothing in processing. Ents rules can easily be embedded in other 
documents (schemas or whatever), and the rules loader will ignore all 
content but its own rules.  These rules may also be compiled into Java, 
using a code-generating class that is part of the package.

I may be adding support for one-way transformation of general entities into 
text, as well as a SAXFilter which processes the skippedEntity event using 
these rules, but neither of those options is presently available.

Ents 0.2 is available under the Mozilla Public License 1.1.  More details 
and code are available at:
http://simonstl.com/projects/ents/

As always, comments and suggestions are welcome.

Simon St.Laurent
Associate Editor, O'Reilly & Associates
http://simonstl.com

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.