org.w3c.dom.TypeInfo#com.sun.org.apache.xerces.internal.xni.Augmentations源码实例Demo

下面列出了org.w3c.dom.TypeInfo#com.sun.org.apache.xerces.internal.xni.Augmentations 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: openjdk-8   文件: AbstractSAXParser.java
/**
 * Ignorable whitespace. For this method to be called, the document
 * source must have some way of determining that the text containing
 * only whitespace characters should be considered ignorable. For
 * example, the validator can determine if a length of whitespace
 * characters in the document are ignorable based on the element
 * content model.
 *
 * @param text The ignorable whitespace.
 * @param augs     Additional information that may include infoset augmentations
 *
 * @throws XNIException Thrown by handler to signal an error.
 */
public void ignorableWhitespace(XMLString text, Augmentations augs) throws XNIException {

    try {
        // SAX1
        if (fDocumentHandler != null) {
            fDocumentHandler.ignorableWhitespace(text.ch, text.offset, text.length);
        }

        // SAX2
        if (fContentHandler != null) {
            fContentHandler.ignorableWhitespace(text.ch, text.offset, text.length);
        }
    }
    catch (SAXException e) {
        throw new XNIException(e);
    }

}
 
源代码2 项目: Bytecoder   文件: AbstractSAXParser.java
/**
 * A notation declaration
 *
 * @param name     The name of the notation.
 * @param identifier    An object containing all location information
 *                      pertinent to this notation.
 * @param augs Additional information that may include infoset
 *                      augmentations.
 *
 * @throws XNIException Thrown by handler to signal an error.
 */
public void notationDecl(String name, XMLResourceIdentifier identifier,
                         Augmentations augs) throws XNIException {
    try {
        // SAX1 and SAX2
        if (fDTDHandler != null) {
            String publicId = identifier.getPublicId();
            String systemId = fResolveDTDURIs ?
                identifier.getExpandedSystemId() : identifier.getLiteralSystemId();
            fDTDHandler.notationDecl(name, publicId, systemId);
        }
    }
    catch (SAXException e) {
        throw new XNIException(e);
    }

}
 
源代码3 项目: Bytecoder   文件: XMLDTDProcessor.java
/**
 * An external entity declaration.
 *
 * @param name     The name of the entity. Parameter entity names start
 *                 with '%', whereas the name of a general entity is just
 *                 the entity name.
 * @param identifier    An object containing all location information
 *                      pertinent to this external entity.
 * @param augs Additional information that may include infoset
 *                      augmentations.
 *
 * @throws XNIException Thrown by handler to signal an error.
 */
public void externalEntityDecl(String name, XMLResourceIdentifier identifier,
                               Augmentations augs) throws XNIException {

    DTDGrammar grammar = (fDTDGrammar != null? fDTDGrammar:  fGrammarBucket.getActiveGrammar());
    int index = grammar.getEntityDeclIndex(name) ;

    //If the same entity is declared more than once, the first declaration
    //encountered is binding, SAX requires only effective(first) declaration
    //to be reported to the application

    //REVISIT: Does it make sense to pass duplicate entity information across
    //the pipeline -- nb?

    //its a new entity and hasn't been declared.
    if(index == -1){
        //store external entity declaration in grammar
        if(fDTDGrammar != null)
            fDTDGrammar.externalEntityDecl(name, identifier, augs);
        // call handlers
        if (fDTDHandler != null) {
            fDTDHandler.externalEntityDecl(name, identifier, augs);
        }
    }

}
 
源代码4 项目: openjdk-jdk8u   文件: AbstractSAXParser.java
/**
 * A notation declaration
 *
 * @param name     The name of the notation.
 * @param identifier    An object containing all location information
 *                      pertinent to this notation.
 * @param augs Additional information that may include infoset
 *                      augmentations.
 *
 * @throws XNIException Thrown by handler to signal an error.
 */
public void notationDecl(String name, XMLResourceIdentifier identifier,
                         Augmentations augs) throws XNIException {
    try {
        // SAX1 and SAX2
        if (fDTDHandler != null) {
            String publicId = identifier.getPublicId();
            String systemId = fResolveDTDURIs ?
                identifier.getExpandedSystemId() : identifier.getLiteralSystemId();
            fDTDHandler.notationDecl(name, publicId, systemId);
        }
    }
    catch (SAXException e) {
        throw new XNIException(e);
    }

}
 
源代码5 项目: openjdk-8-source   文件: AbstractDOMParser.java
/**
 * The end of the DTD.
 *
 * @param augs Additional information that may include infoset
 *                      augmentations.
 *
 * @throws XNIException Thrown by handler to signal an error.
 */
public void endDTD (Augmentations augs) throws XNIException {
    if (DEBUG_EVENTS) {
        System.out.println ("==>endDTD()");
    }
    fInDTD = false;
    if (!fBaseURIStack.isEmpty ()) {
        fBaseURIStack.pop ();
    }
    String internalSubset = fInternalSubset != null && fInternalSubset.length () > 0
    ? fInternalSubset.toString () : null;
    if (fDeferNodeExpansion) {
        if (internalSubset != null) {
            fDeferredDocumentImpl.setInternalSubset (fDocumentTypeIndex, internalSubset);
        }
    }
    else if (fDocumentImpl != null) {
        if (internalSubset != null) {
            ((DocumentTypeImpl)fDocumentType).setInternalSubset (internalSubset);
        }
    }
}
 
/** Handles end element. */
protected void endNamespaceScope(QName element, Augmentations augs, boolean isEmpty)
    throws XNIException {

    // bind element
    String eprefix = element.prefix != null ? element.prefix : XMLSymbols.EMPTY_STRING;
    element.uri = fNamespaceContext.getURI(eprefix);
    if (element.uri != null) {
        element.prefix = eprefix;
    }

    // call handlers
    if (fDocumentHandler != null) {
        if (!isEmpty) {
            fDocumentHandler.endElement(element, augs);
        }
    }

    // pop context
    fNamespaceContext.popContext();

}
 
源代码7 项目: hottub   文件: TeeXMLDocumentFilterImpl.java
public void startDocument(
        XMLLocator locator,
        String encoding,
        NamespaceContext namespaceContext,
        Augmentations augs)
    throws XNIException {
    side.startDocument(locator, encoding, namespaceContext, augs);
    next.startDocument(locator, encoding, namespaceContext, augs);
}
 
源代码8 项目: hottub   文件: XMLDTDValidator.java
protected void endNamespaceScope(QName element,  Augmentations augs, boolean isEmpty){

        // call handlers
        if (fDocumentHandler != null && !isEmpty) {
            // NOTE: The binding of the element doesn't actually happen
            //       yet because the namespace binder does that. However,
            //       if it does it before this point, then the endPrefix-
            //       Mapping calls get made too soon! As long as the
            //       rawnames match, we know it'll have a good binding,
            //       so we can just use the current element. -Ac
            fDocumentHandler.endElement(fCurrentElement, augs);
        }
    }
 
源代码9 项目: openjdk-8   文件: XMLDTDValidator.java
/**
 * The end of the document.
 * @param augs   Additional information that may include infoset augmentations
 *
 * @throws XNIException Thrown by handler to signal an error.
 */
public void endDocument(Augmentations augs) throws XNIException {

    // call handlers
    if (fDocumentHandler != null) {
        fDocumentHandler.endDocument(augs);
    }

}
 
源代码10 项目: JDKSourceCode1.8   文件: XIncludeHandler.java
@Override
public void notationDecl(
    String name,
    XMLResourceIdentifier identifier,
    Augmentations augmentations)
    throws XNIException {
    this.addNotation(name, identifier, augmentations);
    if (fDTDHandler != null) {
        fDTDHandler.notationDecl(name, identifier, augmentations);
    }
}
 
源代码11 项目: Bytecoder   文件: XMLDTDValidator.java
/**
 * The end of a CDATA section.
 * @param augs   Additional information that may include infoset augmentations
 *
 * @throws XNIException Thrown by handler to signal an error.
 */
public void endCDATA(Augmentations augs) throws XNIException {

    fInCDATASection = false;
    // call handlers
    if (fDocumentHandler != null) {
        fDocumentHandler.endCDATA(augs);
    }

}
 
源代码12 项目: JDKSourceCode1.8   文件: XIncludeHandler.java
@Override
public void xmlDecl(
    String version,
    String encoding,
    String standalone,
    Augmentations augs)
    throws XNIException {
    fIsXML11 = "1.1".equals(version);
    if (isRootDocument() && fDocumentHandler != null) {
        fDocumentHandler.xmlDecl(version, encoding, standalone, augs);
    }
}
 
源代码13 项目: Bytecoder   文件: XIncludeHandler.java
@Override
public void startParameterEntity(
    String name,
    XMLResourceIdentifier identifier,
    String encoding,
    Augmentations augmentations)
    throws XNIException {
    if (fDTDHandler != null) {
        fDTDHandler.startParameterEntity(
            name,
            identifier,
            encoding,
            augmentations);
    }
}
 
源代码14 项目: Bytecoder   文件: XMLDTDProcessor.java
/**
 * The start of a conditional section.
 *
 * @param type The type of the conditional section. This value will
 *             either be CONDITIONAL_INCLUDE or CONDITIONAL_IGNORE.
 * @param augs Additional information that may include infoset
 *                      augmentations.
 *
 * @throws XNIException Thrown by handler to signal an error.
 *
 * @see #CONDITIONAL_INCLUDE
 * @see #CONDITIONAL_IGNORE
 */
public void startConditional(short type, Augmentations augs) throws XNIException {

    // set state
    fInDTDIgnore = type == XMLDTDHandler.CONDITIONAL_IGNORE;

    // call handlers
    if(fDTDGrammar != null)
        fDTDGrammar.startConditional(type, augs);
    if (fDTDHandler != null) {
        fDTDHandler.startConditional(type, augs);
    }

}
 
源代码15 项目: jdk8u60   文件: XMLDTDProcessor.java
/**
 * The start of the DTD external subset.
 *
 * @param augs Additional information that may include infoset
 *                      augmentations.
 *
 * @throws XNIException Thrown by handler to signal an error.
 */
public void startExternalSubset(XMLResourceIdentifier identifier,
                                Augmentations augs) throws XNIException {
    if(fDTDGrammar != null)
        fDTDGrammar.startExternalSubset(identifier, augs);
    if(fDTDHandler != null){
        fDTDHandler.startExternalSubset(identifier, augs);
    }
}
 
源代码16 项目: jdk8u60   文件: AbstractSAXParser.java
/**
 * The start of a CDATA section.
 * @param augs     Additional information that may include infoset augmentations
 *
 * @throws XNIException Thrown by handler to signal an error.
 */
public void startCDATA(Augmentations augs) throws XNIException {

    try {
        // SAX2 extension
        if (fLexicalHandler != null) {
            fLexicalHandler.startCDATA();
        }
    }
    catch (SAXException e) {
        throw new XNIException(e);
    }

}
 
源代码17 项目: JDKSourceCode1.8   文件: XMLSchemaValidator.java
/**
 * A comment.
 *
 * @param text The text in the comment.
 * @param augs     Additional information that may include infoset augmentations
 *
 * @throws XNIException Thrown by application to signal an error.
 */
public void comment(XMLString text, Augmentations augs) throws XNIException {

    // call handlers
    if (fDocumentHandler != null) {
        fDocumentHandler.comment(text, augs);
    }

}
 
源代码18 项目: openjdk-8   文件: XIncludeHandler.java
@Override
public void xmlDecl(
    String version,
    String encoding,
    String standalone,
    Augmentations augs)
    throws XNIException {
    fIsXML11 = "1.1".equals(version);
    if (isRootDocument() && fDocumentHandler != null) {
        fDocumentHandler.xmlDecl(version, encoding, standalone, augs);
    }
}
 
源代码19 项目: JDKSourceCode1.8   文件: DTDGrammar.java
/**
 * The end of a group for mixed or children content models.
 *
 * @param augs Additional information that may include infoset
 *                      augmentations.
 * @throws XNIException Thrown by handler to signal an error.
 */
public void endGroup(Augmentations augs) throws XNIException {

    if (!fMixed) {
        if (fPrevNodeIndexStack[fDepth] != -1) {
            fNodeIndexStack[fDepth] = addContentSpecNode(fOpStack[fDepth], fPrevNodeIndexStack[fDepth], fNodeIndexStack[fDepth]);
        }
        int nodeIndex = fNodeIndexStack[fDepth--];
        fNodeIndexStack[fDepth] = nodeIndex;
    }

}
 
源代码20 项目: openjdk-jdk8u-backup   文件: DOMResultAugmentor.java
public void characters(XMLString text, Augmentations augs)
        throws XNIException {
    if (!fIgnoreChars) {
        final Element currentElement = (Element) fDOMValidatorHelper.getCurrentElement();
        currentElement.appendChild(fDocument.createTextNode(text.toString()));
    }
}
 
源代码21 项目: TencentKona-8   文件: AbstractSAXParser.java
/**
 * An element declaration.
 *
 * @param name         The name of the element.
 * @param contentModel The element content model.
 *
 * @param augs Additional information that may include infoset
 *                      augmentations.
 *
 * @throws XNIException Thrown by handler to signal an error.
 */
public void elementDecl(String name, String contentModel, Augmentations augs)
    throws XNIException {

    try {
        // SAX2 extension
        if (fDeclHandler != null) {
            fDeclHandler.elementDecl(name, contentModel);
        }
    }
    catch (SAXException e) {
        throw new XNIException(e);
    }

}
 
/**
 * This method notifies of the start of an entity. The DTD has the
 * pseudo-name of "[dtd]" parameter entity names start with '%'; and
 * general entities are just specified by their name.
 *
 * @param name     The name of the entity.
 * @param identifier The resource identifier.
 * @param encoding The auto-detected IANA encoding name of the entity
 *                 stream. This value will be null in those situations
 *                 where the entity encoding is not auto-detected (e.g.
 *                 internal entities or a document entity that is
 *                 parsed from a java.io.Reader).
 * @param augs     Additional information that may include infoset augmentations
 *
 * @throws XNIException Thrown by handler to signal an error.
 */
public void startEntity(String name,
        XMLResourceIdentifier identifier,
        String encoding, Augmentations augs) throws XNIException {

    // keep track of this entity before fEntityDepth is increased
    if (fEntityDepth == fEntityStack.length) {
        int[] entityarray = new int[fEntityStack.length * 2];
        System.arraycopy(fEntityStack, 0, entityarray, 0, fEntityStack.length);
        fEntityStack = entityarray;
    }
    fEntityStack[fEntityDepth] = fMarkupDepth;

    super.startEntity(name, identifier, encoding, augs);

    // WFC:  entity declared in external subset in standalone doc
    if(fStandalone && fEntityStore.isEntityDeclInExternalSubset(name)) {
        reportFatalError("MSG_REFERENCE_TO_EXTERNALLY_DECLARED_ENTITY_WHEN_STANDALONE",
                new Object[]{name});
    }

    /** we are not calling the handlers yet.. */
    // call handler
    if (fDocumentHandler != null && !fScanningAttribute) {
        if (!name.equals("[xml]")) {
            fDocumentHandler.startGeneralEntity(name, identifier, encoding, augs);
        }
    }

}
 
源代码23 项目: openjdk-8   文件: ShortHandPointer.java
public boolean resolveXPointer(QName element, XMLAttributes attributes,
        Augmentations augs, int event) throws XNIException {

    // reset fIsFragmentResolved
    if (fMatchingChildCount == 0) {
        fIsFragmentResolved = false;
    }

    // On startElement or emptyElement, if no matching elements or parent
    // elements were found, check for a matching idenfitier.
    if (event == XPointerPart.EVENT_ELEMENT_START) {
        if (fMatchingChildCount == 0) {
            fIsFragmentResolved = hasMatchingIdentifier(element, attributes, augs,
                event);
        }
        if (fIsFragmentResolved) {
           fMatchingChildCount++;
        }
    } else if (event == XPointerPart.EVENT_ELEMENT_EMPTY) {
        if (fMatchingChildCount == 0) {
            fIsFragmentResolved = hasMatchingIdentifier(element, attributes, augs,
                event);
        }
    }
    else {
        // On endElement, decrease the matching child count if the child or
        // its parent was resolved.
        if (fIsFragmentResolved) {
            fMatchingChildCount--;
        }
    }

    return fIsFragmentResolved ;
}
 
源代码24 项目: openjdk-8   文件: XIncludeHandler.java
@Override
public void ignoredCharacters(XMLString text, Augmentations augmentations)
    throws XNIException {
    if (fDTDHandler != null) {
        fDTDHandler.ignoredCharacters(text, augmentations);
    }
}
 
源代码25 项目: openjdk-jdk8u   文件: XMLDTDValidator.java
protected void endNamespaceScope(QName element,  Augmentations augs, boolean isEmpty){

        // call handlers
        if (fDocumentHandler != null && !isEmpty) {
            // NOTE: The binding of the element doesn't actually happen
            //       yet because the namespace binder does that. However,
            //       if it does it before this point, then the endPrefix-
            //       Mapping calls get made too soon! As long as the
            //       rawnames match, we know it'll have a good binding,
            //       so we can just use the current element. -Ac
            fDocumentHandler.endElement(fCurrentElement, augs);
        }
    }
 
源代码26 项目: Bytecoder   文件: AbstractSAXParser.java
/**
 * An element declaration.
 *
 * @param name         The name of the element.
 * @param contentModel The element content model.
 *
 * @param augs Additional information that may include infoset
 *                      augmentations.
 *
 * @throws XNIException Thrown by handler to signal an error.
 */
public void elementDecl(String name, String contentModel, Augmentations augs)
    throws XNIException {

    try {
        // SAX2 extension
        if (fDeclHandler != null) {
            fDeclHandler.elementDecl(name, contentModel);
        }
    }
    catch (SAXException e) {
        throw new XNIException(e);
    }

}
 
源代码27 项目: jdk8u60   文件: XIncludeHandler.java
@Override
public void startAttlist(String elementName, Augmentations augmentations)
    throws XNIException {
    if (fDTDHandler != null) {
        fDTDHandler.startAttlist(elementName, augmentations);
    }
}
 
源代码28 项目: Bytecoder   文件: TeeXMLDocumentFilterImpl.java
public void doctypeDecl(String rootElement, String publicId, String systemId, Augmentations augs)
    throws XNIException {
    side.doctypeDecl(rootElement, publicId, systemId, augs);
    next.doctypeDecl(rootElement, publicId, systemId, augs);
}
 
源代码29 项目: TencentKona-8   文件: ValidatorHandlerImpl.java
public void xmlDecl(String version, String encoding, String standalone,
Augmentations augs) throws XNIException {}
 
源代码30 项目: openjdk-8   文件: DOMParserImpl.java
public void internalEntityDecl(String name, XMLString text, XMLString nonNormalizedText, Augmentations augmentations) throws XNIException {
    throw Abort.INSTANCE;
}