Package com.sun.msv.verifier.regexp

VGM implementation by using regular expression derivation algorithm.

See:
          Description

Class Summary
AnyElementToken special Token that matchs any element.
AttributeFeeder Feeds AttributeToken to the expression and obtains the residual (content model).
AttributePicker removes all unnecessary expressions and creates an expression that consists of required attributes and choices only.
AttributePruner Creates an expression whose AttributeExp is completely replaced by nullSet.
AttributeRemover Creates an expression whose AttributeExp is completely replaced by epsilon.
AttributeToken represents attribute and its value.
CombinedChildContentExpCreator creates "combined child content expression" and gathers "elements of concern" and its "attribute-pruned" content model.
CombinedChildContentExpCreator.ExpressionPair  
ComplexAcceptor Accept that is used when more than one pattern can be applicable to the current context.
ComplexAcceptorBaseImpl base implementation of ComplexAcceptor.
ContentModelAcceptor base implementation for SimpleAcceptor and ComplexAcceptor
ContentModelRefExpRemover removes all ReferenceExp from Expression but do not recurse the child elements.
ElementsOfConcernCollector Collects "elements of concern".
ElementToken a token that represents an XML element.
ExpressionAcceptor Acceptor implementation.
REDocumentDeclaration DocumentDeclaration implementation Grammar object can be shared among multiple threads, but this object cannot be shared.
ResidualCalculator computes regular expression derivative.
SimpleAcceptor Acceptor that will be used when only one ElementExp matches the start tag.
StringCareLevelCalculator calculates how character literals should be treated.
StringToken chunk of string.
Token primitive unit of XML instance.
 

Package com.sun.msv.verifier.regexp Description

VGM implementation by using regular expression derivation algorithm.

This implementation bridges a gap between neutral grammar model (com.sun.msv.grammar) and Verifier grammar model (com.sun.msv.verifier).

Performance Analysis

This bridge is tuned for client-side use, where MSV is repeatedly invoked from command line. Particularly,

  1. No preprocessing of grammar is necessary. Abstract grammar model can be directly used. This results in faster schema loading, at the expense of slower validation.
  2. Extensive error recovery and detailed error diagnosis is provided.

Also, this bridge covers full expressiveness of RELAX and TREX.

Algorithm

Those who are interested in the algorithm of this package may want to see the following resources.

regexp.tar.gz
regular expression matching algorithm by Mark Hopkins.
How to validate XML
A brief introduction of the above algorithm by Joe English
TREX implementation
This implementation by James Clark employs the algorithm of Mark Hopkins.