Added walkCharacters (to ContentThingyRule), and walkString (to StringThingyRule) to allow recursion and validation of characters respectively. Implemented StringThingyRule and its subclasses DataThingyRule and LiteralThingyRule to provide character validation logic. Changed getCacheStatus to getCachedStatus for consistency with getCachedRule change. Added 'related' dictionary to ThingyRuleError to provide more contextual information. Changed getAttribute to getAttributeValue. Added documentation about contract for implementing walkSequence methods. Added SingleThingyRule inheritance heirarchy. Created Walker inheritance heirarchy. Completely reimplemented CachingWalker to facilitate delayed playback of maps and sequences as alternative to synchronous CompoundWalker traversal followed by xxxRejected calls. Added recursive validation of Attributes (to handle character validation of Attribute values).
Fixed for name change from getAttribute to getAttributeValue.
Added numerical sort function. Introduced utility function for iterating over RelaxNG DOM nodes when parsing grammars from serialised XML. Introduced DataThingyRule logic compatible with both Attribute and Element parenting (handling special case of inserting TextNode rule). Changed logic of walkSequence...() and walkString...() functions to return an integer indicating the number of positions consumed before returning. Removed use of CompoundWalker in favour of CachingWalker. Added documentation for walkSequence, walkString and walkMap. Fixed latent bug in ElementThingyRule where recursion didn't validate attributes. Simplified xRequired and xRejected logic (only one should ever be fired and xRejected only fired by container rules). Simplified constructor heirarchy for Quantified rules. Fixed latent bug from misnamed value in error reporting string. Removed spurious unreachable line after return value. Unrolled foreach iteration in getCachedCarets(). Refactored replayPositions to use cached positions as canonical caret range.
Removed trailing commas to make lint happy.
Added additional validation to 002 grammar loading, removed spurious trailing comma to make lint happy.
Substituted <text /> element for equivalent <data type='string' />