| java.lang.Object com.sun.xml.xsom.impl.parser.state.NGCCRuntime com.sun.xml.xsom.impl.parser.NGCCRuntimeEx
NGCCRuntimeEx | public class NGCCRuntimeEx extends NGCCRuntime implements PatcherManager(Code) | | NGCCRuntime extended with various utility methods for
parsing XML Schema.
author: Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com) |
Method Summary | |
public void | addErrorChecker(Patch patcher) | public void | addPatcher(Patch patcher) | public void | checkDoubleDefError(XSDeclaration c) | public Locator | copyLocator() Creates a copy of the current locator object. | public AnnotationParser | createAnnotationParser() Creates a new instance of annotation parser. | public ValidationContext | createValidationContext() Returns an immutable snapshot of the current context. | public XmlString | createXmlString(String value) | public void | endPrefixMapping(String prefix) | public String | getAnnotationContextElementName() Gets the element name that contains the annotation element. | public ErrorHandler | getErrorHandler() | 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. | public static boolean | ignorableDuplicateComponent(XSDeclaration c) | public void | importSchema(String ns, String schemaLocation) Imports the specified schema. | public void | includeSchema(String schemaLocation) Includes the specified schema. | public void | onEnterElementConsumed(String uri, String localName, String qname, Attributes atts) | public void | onLeaveElementConsumed(String uri, String localName, String qname) | public boolean | parseBoolean(String v) | public void | parseEntity(InputSource source, boolean includeMode, String expectedNamespace, Locator importLocation) Parses the specified entity. | public ForeignAttributesImpl | parseForeignAttributes(ForeignAttributesImpl next) | public UName | parseUName(String qname) Parses UName under the given context. | public void | reportError(String msg, Locator loc) | public void | reportError(String msg) | public void | startPrefixMapping(String prefix, String uri) | protected void | unexpectedX(String token) |
XMLSchemaNSURI | final public static String XMLSchemaNSURI(Code) | | |
attributeFormDefault | public boolean attributeFormDefault(Code) | | The @attributeFormDefault value of the current schema.
True if local attributes are qualified by default.
|
blockDefault | public int blockDefault(Code) | | The @blockDefault value of the current schema.
|
chameleonMode | public boolean chameleonMode(Code) | | 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.
|
currentSchema | public SchemaImpl currentSchema(Code) | | The schema currently being parsed.
|
elementFormDefault | public boolean elementFormDefault(Code) | | The @elementFormDefault value of the current schema.
True if local elements are qualified by default.
|
finalDefault | public int finalDefault(Code) | | The @finalDefault value of the current schema.
|
addErrorChecker | public void addErrorChecker(Patch patcher)(Code) | | |
copyLocator | public Locator copyLocator()(Code) | | Creates a copy of the current locator object.
|
createAnnotationParser | public AnnotationParser createAnnotationParser()(Code) | | Creates a new instance of annotation parser.
|
createValidationContext | public ValidationContext createValidationContext()(Code) | | Returns an immutable snapshot of the current context.
|
getAnnotationContextElementName | public String getAnnotationContextElementName()(Code) | | Gets the element name that contains the annotation element.
This method works correctly only when called by the annotation handler.
|
hasAlreadyBeenRead | public boolean hasAlreadyBeenRead()(Code) | | 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.
true if the document has already been processed and thusneeds to be skipped. |
ignorableDuplicateComponent | public static boolean ignorableDuplicateComponent(XSDeclaration c)(Code) | | |
parseEntity | public void parseEntity(InputSource source, boolean includeMode, String expectedNamespace, Locator importLocation) throws SAXException(Code) | | Parses the specified entity.
Parameters: importLocation - The source location of the import/include statement.Used for reporting errors. |
Methods inherited from com.sun.xml.xsom.impl.parser.state.NGCCRuntime | public void characters(char[] ch, int start, int length) throws SAXException(Code)(Java Doc) public void consumeAttribute(int index) throws SAXException(Code)(Java Doc) public void endDocument() throws SAXException(Code)(Java Doc) public void endElement(String uri, String localname, String qname) throws SAXException(Code)(Java Doc) public void endPrefixMapping(String prefix) throws SAXException(Code)(Java Doc) public int getAttributeIndex(String uri, String localname)(Code)(Java Doc) public Attributes getCurrentAttributes()(Code)(Java Doc) public Locator getLocator()(Code)(Java Doc) public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException(Code)(Java Doc) public void onEnterElementConsumed(String uri, String localName, String qname, Attributes atts) throws SAXException(Code)(Java Doc) public void onLeaveElementConsumed(String uri, String localName, String qname) throws SAXException(Code)(Java Doc) public void processList(String str) throws SAXException(Code)(Java Doc) public void processingInstruction(String target, String data) throws SAXException(Code)(Java Doc) public void redirectSubtree(ContentHandler child, String uri, String local, String qname) throws SAXException(Code)(Java Doc) public int replace(NGCCEventReceiver o, NGCCEventReceiver n)(Code)(Java Doc) public void reset()(Code)(Java Doc) public String resolveNamespacePrefix(String prefix)(Code)(Java Doc) public void sendEnterAttribute(int threadId, String uri, String local, String qname) throws SAXException(Code)(Java Doc) public void sendEnterElement(int threadId, String uri, String local, String qname, Attributes atts) throws SAXException(Code)(Java Doc) public void sendLeaveAttribute(int threadId, String uri, String local, String qname) throws SAXException(Code)(Java Doc) public void sendLeaveElement(int threadId, String uri, String local, String qname) throws SAXException(Code)(Java Doc) public void sendText(int threadId, String value) throws SAXException(Code)(Java Doc) public void setDocumentLocator(Locator _loc)(Code)(Java Doc) public void setRootHandler(NGCCHandler rootHandler)(Code)(Java Doc) public void skippedEntity(String name) throws SAXException(Code)(Java Doc) public void startDocument()(Code)(Java Doc) public void startElement(String uri, String localname, String qname, Attributes atts) throws SAXException(Code)(Java Doc) public void startPrefixMapping(String prefix, String uri) throws SAXException(Code)(Java Doc) public void trace(String s)(Code)(Java Doc) public void traceln(String s)(Code)(Java Doc) protected void unexpectedX(String token) throws SAXException(Code)(Java Doc)
|
|
|