ANN: REXML 3.1.2

S

SER

Hidee-ho, children.

REXML 3.1.2 is up for grabs. It includes bug fixes, and improvements
to the RelaxNG validation.

Here's the changelog since 3.1.1:

* Entirely rewrote the validation code; the finite state machine,
while cool, didn't survive the encounter with Interleave. The new
mechanism is less elegant, but is basically still a FSM, and is more
flexible without having to add hacks to extend it. Large chunks of
the FSM may be reusable in other validation mechanisms. I hope. I
still need to abstract the cardinality rules. However, I'm pretty
sure that this design is reasonably fast and space efficient.
* Added "interleave" support
* Added suppert for "mixed"
* Added Kou's patch to normalize attribute values passed through the
SAX2 and Stream parsers.
* Applied Kou's preceding-sibling patch, which fixes the order of the
axe results
* Added support for defines and refs.

I don't know if I mentioned this before, but there are a couple of
sneaker features that I haven't documented. They're to be considered
"beta" quality, but you may find them useful. First, as requested, the
#inspect method of Element should be more friendly. Second, there's
limited support for turning nodes into XPaths. It only works on
Element and Attribute nodes, at the moment, but you should be able to
do:

doc = Document.new( "<a><b><c/><c><d/><d/></c></b></a>" )
el = XPath.first( doc, "//d[2]" )
el.xpath # => "/a/b/c[2]/d[2]"

Also, there are two new methods in REXML::parsers::XPathParser --
abbreviate() and expand(); abbreviate takes an XPath and attempts to
compress it (turning axes into their abbreviated forms) while expand
takes abbreviations and turns them into their full XPath axes. Both
methods are incomplete, but I'm actively fixing bugs as they are found.

As usual, REXML can be pulled from:

http://www.germane-software.com/software/rexml

This stuff will find its way into Ruby CVS, eventually. Give me a week
or so.

Cheers,

--- SER
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top