| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| public boolean | attributeFormDefault
The @attributeFormDefault value of the current schema. |
| public int | blockDefault
The @blockDefault value of the current schema. |
| public boolean | chameleonMode
True if the current schema is in a chameleon mode. |
| private NGCCRuntimeEx. | |
| public SchemaImpl | currentSchema
The schema currently being parsed. |
| public SchemaDocumentImpl | document
Points to the |
| private String | documentSystemId
URI that identifies the schema document. |
| public boolean | elementFormDefault
The @elementFormDefault value of the current schema. |
| private final Stack | elementNames
Keep the local name of elements encountered so far. |
| public int | finalDefault
The @finalDefault value of the current schema. |
| private static final Pattern | |
| public final ParserContext | parser
coordinator. |
| private final NGCCRuntimeEx | referer
Points to the schema document (the parser of it) that included/imported this schema. |
| Access | Constructor and Description |
|---|---|
| pack-priv | |
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | addErrorChecker(Patch patcher)
Implements com.
|
| public void | |
| public void | |
| public String | |
| private CharSequence | |
| public Locator | |
| public AnnotationParser | |
| public ValidationContext | Returns: Snapshot of current contextReturns an immutable snapshot of the current context. |
| public XmlString | |
| public void | endPrefixMapping(String prefix)
Overrides com. Implements org. End the scope of a prefix-URI mapping. |
| public String | Returns: Element nameGets the element name that contains the annotation element.This method works correctly only when called by the annotation handler. |
| public ErrorHandler | |
| public boolean | Returns: true if the document has already been processed and thus needs to be skipped.Called when a new document is being parsed and checks if the document has already been parsed before. |
| public static boolean | |
| public void | |
| public void | |
| private static boolean | |
| private boolean | |
| public void | onEnterElementConsumed(String uri, String localName, String qname, Attributes atts)
Overrides com. Called by the generated handler code when an enter element event is consumed. |
| public void | onLeaveElementConsumed(String uri, String localName, String qname)
Overrides com.
|
| public boolean | |
| public void | parseEntity(InputSource source, boolean includeMode, String expectedNamespace, Locator
The source location of the import/include statement.
Used for reporting errors. importLocation)Parses the specified entity. |
| public ForeignAttributesImpl | |
| public UName | Returns: NewUName instance based on attribute name.Attribute name. qname)Parses UName under the given context. |
| public void | reportError(String msg, Locator loc)
Implements com. Reports an error during the parsing. |
| public void | |
| private InputSource | Returns: non-null ifEntityResolver returned an InputSource,
or if the relativeUri parameter seems to be pointing to something.
Otherwise it returns null, in which case import/include should be abandoned.passed to the entity resolver. namespaceURI, String value of the schemaLocation attribute. Can be null. relativeUri)Resolves relative URI found in the document. |
| public void | startPrefixMapping(String prefix, String uri)
Overrides com. Implements org. Begin the scope of a prefix-URI Namespace mapping. |
| protected void |
| attributeFormDefault | back to summary |
|---|---|
| public boolean attributeFormDefault The @attributeFormDefault value of the current schema. True if local attributes are qualified by default. | |
| blockDefault | back to summary |
|---|---|
| public int blockDefault The @blockDefault value of the current schema. | |
| chameleonMode | back to summary |
|---|---|
| public boolean chameleonMode True if the current schema is in a chameleon mode. This changes the way QNames are interpreted. Life is very miserable with XML Schema, as you see. | |
| currentContext | back to summary |
|---|---|
| private NGCCRuntimeEx. | |
| currentSchema | back to summary |
|---|---|
| public SchemaImpl currentSchema The schema currently being parsed. | |
| document | back to summary |
|---|---|
| public SchemaDocumentImpl document Points to the | |
| documentSystemId | back to summary |
|---|---|
| private String documentSystemId URI that identifies the schema document. Maybe null if the system ID is not available. | |
| elementFormDefault | back to summary |
|---|---|
| public boolean elementFormDefault The @elementFormDefault value of the current schema. True if local elements are qualified by default. | |
| elementNames | back to summary |
|---|---|
| private final Stack<String> elementNames Keep the local name of elements encountered so far. This information is passed to AnnotationParser as context information | |
| finalDefault | back to summary |
|---|---|
| public int finalDefault The @finalDefault value of the current schema. | |
| P | back to summary |
|---|---|
| private static final Pattern P | |
| parser | back to summary |
|---|---|
| public final ParserContext parser coordinator. | |
| referer | back to summary |
|---|---|
| private final NGCCRuntimeEx referer Points to the schema document (the parser of it) that included/imported this schema. | |
| NGCCRuntimeEx | back to summary |
|---|---|
| pack-priv NGCCRuntimeEx(ParserContext _parser) | |
| NGCCRuntimeEx | back to summary |
|---|---|
| private NGCCRuntimeEx(ParserContext _parser, boolean chameleonMode, NGCCRuntimeEx referer) | |
| addErrorChecker | back to summary |
|---|---|
| public void addErrorChecker(Patch patcher) Implements com.
| |
| addPatcher | back to summary |
|---|---|
| public void addPatcher(Patch patcher) Implements com.
| |
| checkDoubleDefError | back to summary |
|---|---|
| public void checkDoubleDefError(XSDeclaration c) throws SAXException | |
| collapse | back to summary |
|---|---|
| public String collapse(String text) Utility function for collapsing the namespaces inside qname declarations and 'name' attribute values that should contain the qname values | |
| collapse | back to summary |
|---|---|
| private CharSequence collapse(CharSequence text) This is usually the biggest processing bottleneck. | |
| copyLocator | back to summary |
|---|---|
| public Locator copyLocator() Creates a copy of the current locator object.
| |
| createAnnotationParser | back to summary |
|---|---|
| public AnnotationParser createAnnotationParser() Creates a new instance of annotation parser.
| |
| createValidationContext | back to summary |
|---|---|
| public ValidationContext createValidationContext() Returns an immutable snapshot of the current context.
| |
| createXmlString | back to summary |
|---|---|
| public XmlString createXmlString(String value) | |
| endPrefixMapping | back to summary |
|---|---|
| public void endPrefixMapping(String prefix) throws SAXException Overrides com. Implements org. Doc from org. End the scope of a prefix-URI mapping. See
| |
| getAnnotationContextElementName | back to summary |
|---|---|
| public String getAnnotationContextElementName() Gets the element name that contains the annotation element.This method works correctly only when called by the annotation handler.
| |
| getErrorHandler | back to summary |
|---|---|
| public ErrorHandler getErrorHandler() | |
| hasAlreadyBeenRead | back to summary |
|---|---|
| public boolean hasAlreadyBeenRead() Called when a new document is being parsed and checks if the document has already been parsed before. Used to avoid recursive inclusion. Note that the same document will be parsed multiple times if they are for different target namespaces. Document Graph Model The challenge we are facing here is that you have a graph of documents that reference each other. Each document has an unique URI to identify themselves, and references are done by using those. The graph may contain cycles. Our goal here is to parse all the documents in the graph, without parsing the same document twice. This method implements this check. One complication is the chameleon schema; a document can be parsed multiple times if they are under different target namespaces. Also, note that when you resolve relative URIs in the @schemaLocation, their base URI is *NOT* the URI of the document.
| |
| ignorableDuplicateComponent | back to summary |
|---|---|
| public static boolean ignorableDuplicateComponent(XSDeclaration c) | |
| importSchema | back to summary |
|---|---|
| public void importSchema(String ns, String schemaLocation) throws SAXException Imports the specified schema. | |
| includeSchema | back to summary |
|---|---|
| public void includeSchema(String schemaLocation) throws SAXException Includes the specified schema. | |
| isAbsolute | back to summary |
|---|---|
| private static boolean isAbsolute(String uri) | |
| isWhiteSpace | back to summary |
|---|---|
| private boolean isWhiteSpace(char ch) returns true if the specified char is a white space character. | |
| onEnterElementConsumed | back to summary |
|---|---|
| public void onEnterElementConsumed(String uri, String localName, String qname, Attributes atts) throws SAXException Overrides com. Doc from com. Called by the generated handler code when an enter element event is consumed. Pushes a new attribute set. Note that attributes are NOT pushed at the startElement method, because the processing of the enterElement event can trigger other attribute events and etc. This method will be called from one of handlers when it truely consumes the enterElement event.
| |
| onLeaveElementConsumed | back to summary |
|---|---|
| public void onLeaveElementConsumed(String uri, String localName, String qname) throws SAXException Overrides com.
| |
| parseBoolean | back to summary |
|---|---|
| public boolean parseBoolean(String v) | |
| parseEntity | back to summary |
|---|---|
| public void parseEntity(InputSource source, boolean includeMode, String expectedNamespace, Locator importLocation) throws SAXException Parses the specified entity.
| |
| parseForeignAttributes | back to summary |
|---|---|
| public ForeignAttributesImpl parseForeignAttributes(ForeignAttributesImpl next) | |
| parseUName | back to summary |
|---|---|
| public UName parseUName(final String qname) throws SAXException Parses UName under the given context. | |
| reportError | back to summary |
|---|---|
| public void reportError(String msg, Locator loc) throws SAXException Implements com. Doc from com. Reports an error during the parsing.
| |
| reportError | back to summary |
|---|---|
| public void reportError(String msg) throws SAXException | |
| resolveRelativeURL | back to summary |
|---|---|
| private InputSource resolveRelativeURL(String namespaceURI, String relativeUri) throws SAXException Resolves relative URI found in the document.
| |
| startPrefixMapping | back to summary |
|---|---|
| public void startPrefixMapping(String prefix, String uri) throws SAXException Overrides com. Implements org. Doc from org. Begin the scope of a prefix-URI Namespace mapping. The information from this event is not necessary for
normal Namespace processing: the SAX XML reader will
automatically replace prefixes for element and attribute
names when the There are cases, however, when applications need to use prefixes in character data or in attribute values, where they cannot safely be expanded automatically; the start/endPrefixMapping event supplies the information to the application to expand prefixes in those contexts itself, if necessary. Note that start/endPrefixMapping events are not
guaranteed to be properly nested relative to each other:
all startPrefixMapping events will occur immediately before the
corresponding There should never be start/endPrefixMapping events for the "xml" prefix, since it is predeclared and immutable.
| |
| unexpectedX | back to summary |
|---|---|
| protected void unexpectedX(String token) throws SAXException Overrides com.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final String | |
| private final NGCCRuntimeEx. | |
| private final String |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public String | getBaseUri()
Implements com. Returns the base URI of the context. |
| public boolean | isNotation(String arg0)
Implements com. Checks if a notation is declared with the specified name. |
| public boolean | isUnparsedEntity(String arg0)
Implements com. Checks if an unparsed entity is declared with the specified name. |
| public String | resolveNamespacePrefix(String p)
Implements com. Resolves a namespace prefix to the corresponding namespace URI. |
| prefix | back to summary |
|---|---|
| private final String prefix | |
| previous | back to summary |
|---|---|
| private final NGCCRuntimeEx. | |
| uri | back to summary |
|---|---|
| private final String uri | |
| Context | back to summary |
|---|---|
| pack-priv Context(String _prefix, String _uri, NGCCRuntimeEx. | |
| getBaseUri | back to summary |
|---|---|
| public String getBaseUri() Implements com. Doc from com. Returns the base URI of the context. The null string may be returned if no base URI is known.
| |
| isNotation | back to summary |
|---|---|
| public boolean isNotation(String arg0) Implements com. Doc from com. Checks if a notation is declared with the specified name.
| |
| isUnparsedEntity | back to summary |
|---|---|
| public boolean isUnparsedEntity(String arg0) Implements com. Doc from com. Checks if an unparsed entity is declared with the specified name.
| |
| resolveNamespacePrefix | back to summary |
|---|---|
| public String resolveNamespacePrefix(String p) Implements com. Doc from com. Resolves a namespace prefix to the corresponding namespace URI. This method is used for validating the QName type, for example. If the prefix is "" (empty string), it indicates an unprefixed value. The callee should resolve it as for an unprefixed element, rather than for an unprefixed attribute. If the prefix is "xml", then the callee must resolve this prefix into "http://www.w3.org/XML/1998/namespace", as defined in the XML Namespaces Recommendation.
| |