Class RELAXReader

  • All Implemented Interfaces:
    IDContextProvider2, org.relaxng.datatype.ValidationContext, org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler, org.xml.sax.XMLFilter, org.xml.sax.XMLReader
    Direct Known Subclasses:
    RELAXCoreReader, RELAXNSReader

    public abstract class RELAXReader
    extends GrammarReader
    reads RELAX grammar/module by SAX2 and constructs abstract grammar model.
    • Method Detail

      • canHaveOccurs

        protected boolean canHaveOccurs​(State state)
        returns true if the given state can have "occurs" attribute.
      • interceptExpression

        protected Expression interceptExpression​(State state,
                                                 Expression exp)
        Description copied from class: GrammarReader
        intercepts an expression made by ExpressionState before it is passed to the parent state. derived class can perform further wrap-up before it is received by the parent. This mechanism is used by RELAXReader to handle occurs attribute.
        Overrides:
        interceptExpression in class GrammarReader
      • resolveElementRef

        protected abstract Expression resolveElementRef​(java.lang.String namespace,
                                                        java.lang.String label)
        obtains an Expression specified by given (namespace,label) pair. this method is called to parse <ref label="..." /> element.
      • resolveHedgeRef

        protected abstract Expression resolveHedgeRef​(java.lang.String namespace,
                                                      java.lang.String label)
        obtains an Expression specified by given (namespace,label) pair. this method is called to parse <hedgeRef label="..." /> element.
      • localizeMessage

        protected java.lang.String localizeMessage​(java.lang.String propertyName,
                                                   java.lang.Object[] args)
        Description copied from class: GrammarReader
        formats localized message with arguments
        Specified by:
        localizeMessage in class GrammarReader