public class RELAXNGReader extends TREXBaseReader
| Modifier and Type | Class and Description |
|---|---|
protected static class |
RELAXNGReader.RefExpParseInfo
information necessary to correctly parse pattern definitions.
|
static class |
RELAXNGReader.StateFactory
creates various State object, which in turn parses grammar.
|
GrammarReader.BackPatch, GrammarReader.BackwardReferenceMap, GrammarReader.ChainPrefixResolver, GrammarReader.PrefixResolverERR_BAD_COMBINE, ERR_COMBINE_MISSING, ERR_DUPLICATE_DEFINITION, ERR_INTERLEAVED_ANYSTRING, ERR_INTERLEAVED_STRING, ERR_MISSING_CHILD_NAMECLASS, ERR_MORE_THAN_ONE_NAMECLASS, ERR_NONEXISTENT_PARENT_GRAMMAR, ERR_REPEATED_STRING, ERR_SEQUENCED_STRING, ERR_UNDECLARED_PREFIX, ERR_UNDEFINED_PATTERN, ERR_UNKNOWN_DATATYPE_VOCABULARY, grammar, sfactory, targetNamespace, WRN_COMBINE_IGNORED, WRN_OBSOLETED_XMLSCHEMA_NAMSPACEbackwardReference, basePrefixResolver, controller, ERR_BAD_ATTRIBUTE_VALUE, ERR_BAD_TYPE, ERR_CHARACTERS, ERR_CONFLICTING_ATTRIBUTES, ERR_DATATYPE_ALREADY_DEFINED, ERR_DISALLOWED_ATTRIBUTE, ERR_FRAGMENT_IDENTIFIER, ERR_ILLEGAL_FINAL_VALUE, ERR_MALPLACED_ELEMENT, ERR_MISSING_ATTRIBUTE, ERR_MISSING_ATTRIBUTE_2, ERR_MISSING_CHILD_EXPRESSION, ERR_MISSING_CHILD_TYPE, ERR_MISSING_TOPLEVEL, ERR_MORE_THAN_ONE_CHILD_EXPRESSION, ERR_MORE_THAN_ONE_CHILD_TYPE, ERR_RECURSIVE_DATATYPE, ERR_RECURSIVE_INCLUDE, ERR_RUNAWAY_EXPRESSION, ERR_UNDEFINED_DATATYPE, parserFactory, pool, prefixResolver, WRN_DEPRECATED_TYPENAME, WRN_MAYBE_WRONG_NAMESPACE| Constructor and Description |
|---|
RELAXNGReader(GrammarReaderController controller)
easy-to-use constructor.
|
RELAXNGReader(GrammarReaderController controller,
SAXParserFactory parserFactory)
easy-to-use constructor.
|
RELAXNGReader(GrammarReaderController controller,
SAXParserFactory parserFactory,
RELAXNGReader.StateFactory stateFactory,
ExpressionPool pool)
full constructor
|
| Modifier and Type | Method and Description |
|---|---|
State |
createExpressionChildState(State parent,
StartTagInfo tag)
this method must be implemented by the derived class to create
language-default expresion state.
|
protected State |
createNameClassChildState(State parent,
StartTagInfo tag) |
void |
endDocument() |
void |
endElement(String a,
String b,
String c) |
org.relaxng.datatype.DatatypeLibrary |
getCurrentDatatypeLibrary() |
org.relaxng.datatype.DatatypeLibraryFactory |
getDatatypeLibraryFactory()
Returns the datatypeLibraryFactory.
|
protected TREXGrammar |
getGrammar() |
protected RELAXNGReader.RefExpParseInfo |
getRefExpParseInfo(ReferenceExp exp)
Gets RefExpParseInfo object for the specified ReferenceExp.
|
static org.iso_relax.verifier.Schema |
getRELAXNGSchema4Schema() |
protected RELAXNGReader.StateFactory |
getStateFactory() |
protected boolean |
isGrammarElement(StartTagInfo tag)
checks if given element is that of the grammar elements.
|
protected String |
localizeMessage(String propertyName,
Object[] args)
formats localized message with arguments
|
static TREXGrammar |
parse(InputSource grammar,
SAXParserFactory factory,
GrammarReaderController controller)
loads RELAX NG pattern
|
static TREXGrammar |
parse(String grammarURL,
SAXParserFactory factory,
GrammarReaderController controller)
loads RELAX NG pattern
|
org.relaxng.datatype.Datatype |
resolveDataType(String localName)
obtains a named DataType object referenced by a local name.
|
org.relaxng.datatype.DatatypeLibrary |
resolveDataTypeLibrary(String uri)
obtains the DataTypeLibrary that represents the specified namespace URI.
|
String |
resolveNamespacePrefix(String prefix) |
void |
setDatatypeLibraryFactory(org.relaxng.datatype.DatatypeLibraryFactory datatypeLibraryFactory)
Sets the datatypeLibraryFactory.
|
void |
startDocument() |
void |
startElement(String a,
String b,
String c,
Attributes d) |
void |
wrapUp()
performs final wrap-up.
|
getResult, getResultAsGrammar, getTargetNamespace_parse, addBackPatchJob, addBackPatchJob, combineURI, combineURL, createParserFactory, detectUndefinedOnes, endPrefixMapping, getBackwardCompatibleType, getBaseUri, getCurrentState, getDeclaredLocationOf, getLocator, inputSourceFromLSInput, interceptExpression, isNotation, isUnparsedEntity, iterateInscopeNamespaces, onID, parse, parse, parse, popState, pushState, reportError, reportError, reportError, reportError, reportError, reportError, reportError, reportError, reportWarning, reportWarning, reportWarning, reportWarning, resolveLocation, runBackPatchJob, setDeclaredLocationOf, setDocumentLocator, setLocator, splitQName, startPrefixMapping, switchSource, switchSource, switchSourcecharacters, error, fatalError, getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getParent, getProperty, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setContentHandler, setDTDHandler, setEntityResolver, setErrorHandler, setFeature, setParent, setProperty, skippedEntity, unparsedEntityDecl, warningprotected static org.iso_relax.verifier.Schema relaxNGSchema4Schema
protected RELAXNGReader.RefExpParseInfo currentNamedPattern
This field is set to null when there is an error, or the pattern being defined is being re-defined.
This is a part of the process of the recursive self reference error detection.
protected boolean directRefernce
currentNamedPattern.refs.
This is a part of the process of the recursive self reference error detection.
public static final String RELAXNGNamespace
protected final RestrictionChecker restrictionChecker
protected String datatypeLibURI
public static final String ERR_BAD_FACET
public static final String ERR_INVALID_PARAMETERS
public static final String ERR_BAD_DATA_VALUE
public static final String ERR_UNDEFINED_KEY
public static final String ERR_UNDEFINED_DATATYPE_1
public static final String ERR_INCONSISTENT_KEY_TYPE
public static final String ERR_INCONSISTENT_COMBINE
public static final String ERR_REDEFINING_UNDEFINED
public static final String ERR_UNKNOWN_DATATYPE_VOCABULARY_1
public static final String ERR_MULTIPLE_EXCEPT
public static final String ERR_NOT_ABSOLUTE_URI
public static final String ERR_INFOSET_URI_ATTRIBUTE
public static final String ERR_XMLNS_ATTRIBUTE
public static final String ERR_NAKED_INFINITE_ATTRIBUTE_NAMECLASS
public RELAXNGReader(GrammarReaderController controller)
public RELAXNGReader(GrammarReaderController controller, SAXParserFactory parserFactory)
public RELAXNGReader(GrammarReaderController controller, SAXParserFactory parserFactory, RELAXNGReader.StateFactory stateFactory, ExpressionPool pool)
public static TREXGrammar parse(String grammarURL, SAXParserFactory factory, GrammarReaderController controller)
public static TREXGrammar parse(InputSource grammar, SAXParserFactory factory, GrammarReaderController controller)
public static org.iso_relax.verifier.Schema getRELAXNGSchema4Schema()
protected String localizeMessage(String propertyName, Object[] args)
GrammarReaderlocalizeMessage in class TREXBaseReaderprotected TREXGrammar getGrammar()
protected RELAXNGReader.RefExpParseInfo getRefExpParseInfo(ReferenceExp exp)
protected boolean isGrammarElement(StartTagInfo tag)
GrammarReaderisGrammarElement in class GrammarReaderpublic org.relaxng.datatype.DatatypeLibraryFactory getDatatypeLibraryFactory()
public void setDatatypeLibraryFactory(org.relaxng.datatype.DatatypeLibraryFactory datatypeLibraryFactory)
protected RELAXNGReader.StateFactory getStateFactory()
protected State createNameClassChildState(State parent, StartTagInfo tag)
createNameClassChildState in class TREXBaseReaderpublic State createExpressionChildState(State parent, StartTagInfo tag)
GrammarReadercreateExpressionChildState in class TREXBaseReaderpublic org.relaxng.datatype.Datatype resolveDataType(String localName)
public org.relaxng.datatype.DatatypeLibrary resolveDataTypeLibrary(String uri)
public void wrapUp()
TREXBaseReaderThis method has to be called after the run-away expression check is done.
wrapUp in class TREXBaseReaderpublic org.relaxng.datatype.DatatypeLibrary getCurrentDatatypeLibrary()
public String resolveNamespacePrefix(String prefix)
resolveNamespacePrefix in interface org.relaxng.datatype.ValidationContextresolveNamespacePrefix in class GrammarReaderpublic void startDocument()
throws SAXException
startDocument in interface ContentHandlerstartDocument in class org.xml.sax.helpers.XMLFilterImplSAXExceptionpublic void endDocument()
throws SAXException
endDocument in interface ContentHandlerendDocument in class org.xml.sax.helpers.XMLFilterImplSAXExceptionpublic void startElement(String a, String b, String c, Attributes d) throws SAXException
startElement in interface ContentHandlerstartElement in class TREXBaseReaderSAXExceptionpublic void endElement(String a, String b, String c) throws SAXException
endElement in interface ContentHandlerendElement in class TREXBaseReaderSAXExceptionCopyright © 2014 Oracle Corporation. All Rights Reserved.