com.sun.org.apache.xerces.internal.util.XMLResourceIdentifierImpl Java Examples

The following examples show how to use com.sun.org.apache.xerces.internal.util.XMLResourceIdentifierImpl. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: XMLEntityStorage.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Adds an unparsed entity declaration.
 * <p>
 * <strong>Note:</strong> This method ignores subsequent entity
 * declarations.
 * <p>
 * <strong>Note:</strong> The name should be a unique symbol. The
 * SymbolTable can be used for this purpose.
 *
 * @param name     The name of the entity.
 * @param publicId The public identifier of the entity.
 * @param systemId The system identifier of the entity.
 * @param notation The name of the notation.
 *
 * @see SymbolTable
 */
public void addUnparsedEntity(String name,
String publicId, String systemId,
String baseSystemId, String notation) {

    fCurrentEntity = fEntityManager.getCurrentEntity();
    if (!fEntities.containsKey(name)) {
        Entity entity = new Entity.ExternalEntity(name, new XMLResourceIdentifierImpl(publicId, systemId, baseSystemId, null), notation, fInExternalSubset);
        //                  (fCurrentEntity == null) ? fasle : fCurrentEntity.isEntityDeclInExternalSubset());
        //                  fCurrentEntity.isEntityDeclInExternalSubset());
        fEntities.put(name, entity);
    }
    else{
        if(fWarnDuplicateEntityDef){
            fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
            "MSG_DUPLICATE_ENTITY_DEFINITION",
            new Object[]{ name },
            XMLErrorReporter.SEVERITY_WARNING );
        }
    }
}
 
Example #2
Source File: XIncludeHandler.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
public XIncludeHandler() {
    fDepth = 0;

    fSawFallback[fDepth] = false;
    fSawInclude[fDepth] = false;
    fState[fDepth] = STATE_NORMAL_PROCESSING;
    fNotations = new ArrayList();
    fUnparsedEntities = new ArrayList();

    fBaseURIScope = new IntStack();
    fBaseURI = new Stack();
    fLiteralSystemID = new Stack();
    fExpandedSystemID = new Stack();
    fCurrentBaseURI = new XMLResourceIdentifierImpl();

    fLanguageScope = new IntStack();
    fLanguageStack = new Stack();
    fCurrentLanguage = null;
}
 
Example #3
Source File: XIncludeHandler.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
public XIncludeHandler() {
    fDepth = 0;

    fSawFallback[fDepth] = false;
    fSawInclude[fDepth] = false;
    fState[fDepth] = STATE_NORMAL_PROCESSING;
    fNotations = new ArrayList();
    fUnparsedEntities = new ArrayList();

    fBaseURIScope = new IntStack();
    fBaseURI = new Stack();
    fLiteralSystemID = new Stack();
    fExpandedSystemID = new Stack();
    fCurrentBaseURI = new XMLResourceIdentifierImpl();

    fLanguageScope = new IntStack();
    fLanguageStack = new Stack();
    fCurrentLanguage = null;
}
 
Example #4
Source File: XMLEntityStorage.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Adds an unparsed entity declaration.
 * <p>
 * <strong>Note:</strong> This method ignores subsequent entity
 * declarations.
 * <p>
 * <strong>Note:</strong> The name should be a unique symbol. The
 * SymbolTable can be used for this purpose.
 *
 * @param name     The name of the entity.
 * @param publicId The public identifier of the entity.
 * @param systemId The system identifier of the entity.
 * @param notation The name of the notation.
 *
 * @see SymbolTable
 */
public void addUnparsedEntity(String name,
String publicId, String systemId,
String baseSystemId, String notation) {

    fCurrentEntity = fEntityManager.getCurrentEntity();
    if (!fEntities.containsKey(name)) {
        Entity entity = new Entity.ExternalEntity(name, new XMLResourceIdentifierImpl(publicId, systemId, baseSystemId, null), notation, fInExternalSubset);
        //                  (fCurrentEntity == null) ? fasle : fCurrentEntity.isEntityDeclInExternalSubset());
        //                  fCurrentEntity.isEntityDeclInExternalSubset());
        fEntities.put(name, entity);
    }
    else{
        if(fWarnDuplicateEntityDef){
            fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
            "MSG_DUPLICATE_ENTITY_DEFINITION",
            new Object[]{ name },
            XMLErrorReporter.SEVERITY_WARNING );
        }
    }
}
 
Example #5
Source File: XMLEntityStorage.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Adds an unparsed entity declaration.
 * <p>
 * <strong>Note:</strong> This method ignores subsequent entity
 * declarations.
 * <p>
 * <strong>Note:</strong> The name should be a unique symbol. The
 * SymbolTable can be used for this purpose.
 *
 * @param name     The name of the entity.
 * @param publicId The public identifier of the entity.
 * @param systemId The system identifier of the entity.
 * @param notation The name of the notation.
 *
 * @see SymbolTable
 */
public void addUnparsedEntity(String name,
String publicId, String systemId,
String baseSystemId, String notation) {

    fCurrentEntity = fEntityManager.getCurrentEntity();
    if (!fEntities.containsKey(name)) {
        Entity entity = new Entity.ExternalEntity(name, new XMLResourceIdentifierImpl(publicId, systemId, baseSystemId, null), notation, fInExternalSubset);
        //                  (fCurrentEntity == null) ? fasle : fCurrentEntity.isEntityDeclInExternalSubset());
        //                  fCurrentEntity.isEntityDeclInExternalSubset());
        fEntities.put(name, entity);
    }
    else{
        if(fWarnDuplicateEntityDef){
            fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
            "MSG_DUPLICATE_ENTITY_DEFINITION",
            new Object[]{ name },
            XMLErrorReporter.SEVERITY_WARNING );
        }
    }
}
 
Example #6
Source File: XIncludeHandler.java    From jdk1.8-source-analysis with Apache License 2.0 6 votes vote down vote up
public XIncludeHandler() {
    fDepth = 0;

    fSawFallback[fDepth] = false;
    fSawInclude[fDepth] = false;
    fState[fDepth] = STATE_NORMAL_PROCESSING;
    fNotations = new ArrayList();
    fUnparsedEntities = new ArrayList();

    fBaseURIScope = new IntStack();
    fBaseURI = new Stack();
    fLiteralSystemID = new Stack();
    fExpandedSystemID = new Stack();
    fCurrentBaseURI = new XMLResourceIdentifierImpl();

    fLanguageScope = new IntStack();
    fLanguageStack = new Stack();
    fCurrentLanguage = null;
}
 
Example #7
Source File: XMLEntityStorage.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Adds an unparsed entity declaration.
 * <p>
 * <strong>Note:</strong> This method ignores subsequent entity
 * declarations.
 * <p>
 * <strong>Note:</strong> The name should be a unique symbol. The
 * SymbolTable can be used for this purpose.
 *
 * @param name     The name of the entity.
 * @param publicId The public identifier of the entity.
 * @param systemId The system identifier of the entity.
 * @param notation The name of the notation.
 *
 * @see SymbolTable
 */
public void addUnparsedEntity(String name,
String publicId, String systemId,
String baseSystemId, String notation) {

    fCurrentEntity = fEntityManager.getCurrentEntity();
    if (!fEntities.containsKey(name)) {
        Entity entity = new Entity.ExternalEntity(name, new XMLResourceIdentifierImpl(publicId, systemId, baseSystemId, null), notation, fInExternalSubset);
        //                  (fCurrentEntity == null) ? fasle : fCurrentEntity.isEntityDeclInExternalSubset());
        //                  fCurrentEntity.isEntityDeclInExternalSubset());
        fEntities.put(name, entity);
    }
    else{
        if(fWarnDuplicateEntityDef){
            fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
            "MSG_DUPLICATE_ENTITY_DEFINITION",
            new Object[]{ name },
            XMLErrorReporter.SEVERITY_WARNING );
        }
    }
}
 
Example #8
Source File: XIncludeHandler.java    From JDKSourceCode1.8 with MIT License 6 votes vote down vote up
public XIncludeHandler() {
    fDepth = 0;

    fSawFallback[fDepth] = false;
    fSawInclude[fDepth] = false;
    fState[fDepth] = STATE_NORMAL_PROCESSING;
    fNotations = new ArrayList();
    fUnparsedEntities = new ArrayList();

    fBaseURIScope = new IntStack();
    fBaseURI = new Stack();
    fLiteralSystemID = new Stack();
    fExpandedSystemID = new Stack();
    fCurrentBaseURI = new XMLResourceIdentifierImpl();

    fLanguageScope = new IntStack();
    fLanguageStack = new Stack();
    fCurrentLanguage = null;
}
 
Example #9
Source File: XIncludeHandler.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
public XIncludeHandler() {
    fDepth = 0;

    fSawFallback[fDepth] = false;
    fSawInclude[fDepth] = false;
    fState[fDepth] = STATE_NORMAL_PROCESSING;
    fNotations = new ArrayList();
    fUnparsedEntities = new ArrayList();

    fBaseURIScope = new IntStack();
    fBaseURI = new Stack();
    fLiteralSystemID = new Stack();
    fExpandedSystemID = new Stack();
    fCurrentBaseURI = new XMLResourceIdentifierImpl();

    fLanguageScope = new IntStack();
    fLanguageStack = new Stack();
    fCurrentLanguage = null;
}
 
Example #10
Source File: XIncludeHandler.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
public XIncludeHandler() {
    fDepth = 0;

    fSawFallback[fDepth] = false;
    fSawInclude[fDepth] = false;
    fState[fDepth] = STATE_NORMAL_PROCESSING;
    fNotations = new ArrayList();
    fUnparsedEntities = new ArrayList();

    fBaseURIScope = new IntStack();
    fBaseURI = new Stack();
    fLiteralSystemID = new Stack();
    fExpandedSystemID = new Stack();
    fCurrentBaseURI = new XMLResourceIdentifierImpl();

    fLanguageScope = new IntStack();
    fLanguageStack = new Stack();
    fCurrentLanguage = null;
}
 
Example #11
Source File: XIncludeHandler.java    From Bytecoder with Apache License 2.0 6 votes vote down vote up
public XIncludeHandler() {
    fDepth = 0;

    fSawFallback[fDepth] = false;
    fSawInclude[fDepth] = false;
    fState[fDepth] = STATE_NORMAL_PROCESSING;
    fNotations = new ArrayList<>();
    fUnparsedEntities = new ArrayList<>();

    fBaseURIScope = new IntStack();
    fBaseURI = new Stack<>();
    fLiteralSystemID = new Stack<>();
    fExpandedSystemID = new Stack<>();
    fCurrentBaseURI = new XMLResourceIdentifierImpl();

    fLanguageScope = new IntStack();
    fLanguageStack = new Stack<>();
    fCurrentLanguage = null;
}
 
Example #12
Source File: XMLEntityStorage.java    From Bytecoder with Apache License 2.0 6 votes vote down vote up
/**
 * Adds an unparsed entity declaration.
 * <p>
 * <strong>Note:</strong> This method ignores subsequent entity
 * declarations.
 * <p>
 * <strong>Note:</strong> The name should be a unique symbol. The
 * SymbolTable can be used for this purpose.
 *
 * @param name     The name of the entity.
 * @param publicId The public identifier of the entity.
 * @param systemId The system identifier of the entity.
 * @param notation The name of the notation.
 *
 * @see SymbolTable
 */
public void addUnparsedEntity(String name,
String publicId, String systemId,
String baseSystemId, String notation) {

    fCurrentEntity = fEntityManager.getCurrentEntity();
    if (!fEntities.containsKey(name)) {
        Entity entity = new Entity.ExternalEntity(name,
                new XMLResourceIdentifierImpl(publicId, systemId, baseSystemId, null),
                notation, fInExternalSubset);
        fEntities.put(name, entity);
    }
    else{
        if(fWarnDuplicateEntityDef){
            fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
            "MSG_DUPLICATE_ENTITY_DEFINITION",
            new Object[]{ name },
            XMLErrorReporter.SEVERITY_WARNING );
        }
    }
}
 
Example #13
Source File: XIncludeHandler.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
public XIncludeHandler() {
    fDepth = 0;

    fSawFallback[fDepth] = false;
    fSawInclude[fDepth] = false;
    fState[fDepth] = STATE_NORMAL_PROCESSING;
    fNotations = new ArrayList<>();
    fUnparsedEntities = new ArrayList<>();

    fBaseURIScope = new IntStack();
    fBaseURI = new Stack();
    fLiteralSystemID = new Stack();
    fExpandedSystemID = new Stack();
    fCurrentBaseURI = new XMLResourceIdentifierImpl();

    fLanguageScope = new IntStack();
    fLanguageStack = new Stack();
    fCurrentLanguage = null;
}
 
Example #14
Source File: XMLEntityStorage.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Adds an unparsed entity declaration.
 * <p>
 * <strong>Note:</strong> This method ignores subsequent entity
 * declarations.
 * <p>
 * <strong>Note:</strong> The name should be a unique symbol. The
 * SymbolTable can be used for this purpose.
 *
 * @param name     The name of the entity.
 * @param publicId The public identifier of the entity.
 * @param systemId The system identifier of the entity.
 * @param notation The name of the notation.
 *
 * @see SymbolTable
 */
public void addUnparsedEntity(String name,
String publicId, String systemId,
String baseSystemId, String notation) {

    fCurrentEntity = fEntityManager.getCurrentEntity();
    if (!fEntities.containsKey(name)) {
        Entity entity = new Entity.ExternalEntity(name,
                new XMLResourceIdentifierImpl(publicId, systemId, baseSystemId, null),
                notation, fInExternalSubset);
        fEntities.put(name, entity);
    }
    else{
        if(fWarnDuplicateEntityDef){
            fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
            "MSG_DUPLICATE_ENTITY_DEFINITION",
            new Object[]{ name },
            XMLErrorReporter.SEVERITY_WARNING );
        }
    }
}
 
Example #15
Source File: XIncludeHandler.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
public XIncludeHandler() {
    fDepth = 0;

    fSawFallback[fDepth] = false;
    fSawInclude[fDepth] = false;
    fState[fDepth] = STATE_NORMAL_PROCESSING;
    fNotations = new ArrayList();
    fUnparsedEntities = new ArrayList();

    fBaseURIScope = new IntStack();
    fBaseURI = new Stack();
    fLiteralSystemID = new Stack();
    fExpandedSystemID = new Stack();
    fCurrentBaseURI = new XMLResourceIdentifierImpl();

    fLanguageScope = new IntStack();
    fLanguageStack = new Stack();
    fCurrentLanguage = null;
}
 
Example #16
Source File: XMLEntityStorage.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Adds an unparsed entity declaration.
 * <p>
 * <strong>Note:</strong> This method ignores subsequent entity
 * declarations.
 * <p>
 * <strong>Note:</strong> The name should be a unique symbol. The
 * SymbolTable can be used for this purpose.
 *
 * @param name     The name of the entity.
 * @param publicId The public identifier of the entity.
 * @param systemId The system identifier of the entity.
 * @param notation The name of the notation.
 *
 * @see SymbolTable
 */
public void addUnparsedEntity(String name,
String publicId, String systemId,
String baseSystemId, String notation) {

    fCurrentEntity = fEntityManager.getCurrentEntity();
    if (!fEntities.containsKey(name)) {
        Entity entity = new Entity.ExternalEntity(name, new XMLResourceIdentifierImpl(publicId, systemId, baseSystemId, null), notation, fInExternalSubset);
        //                  (fCurrentEntity == null) ? fasle : fCurrentEntity.isEntityDeclInExternalSubset());
        //                  fCurrentEntity.isEntityDeclInExternalSubset());
        fEntities.put(name, entity);
    }
    else{
        if(fWarnDuplicateEntityDef){
            fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
            "MSG_DUPLICATE_ENTITY_DEFINITION",
            new Object[]{ name },
            XMLErrorReporter.SEVERITY_WARNING );
        }
    }
}
 
Example #17
Source File: XIncludeHandler.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
public XIncludeHandler() {
    fDepth = 0;

    fSawFallback[fDepth] = false;
    fSawInclude[fDepth] = false;
    fState[fDepth] = STATE_NORMAL_PROCESSING;
    fNotations = new ArrayList();
    fUnparsedEntities = new ArrayList();

    fBaseURIScope = new IntStack();
    fBaseURI = new Stack();
    fLiteralSystemID = new Stack();
    fExpandedSystemID = new Stack();
    fCurrentBaseURI = new XMLResourceIdentifierImpl();

    fLanguageScope = new IntStack();
    fLanguageStack = new Stack();
    fCurrentLanguage = null;
}
 
Example #18
Source File: XMLEntityStorage.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Adds an unparsed entity declaration.
 * <p>
 * <strong>Note:</strong> This method ignores subsequent entity
 * declarations.
 * <p>
 * <strong>Note:</strong> The name should be a unique symbol. The
 * SymbolTable can be used for this purpose.
 *
 * @param name     The name of the entity.
 * @param publicId The public identifier of the entity.
 * @param systemId The system identifier of the entity.
 * @param notation The name of the notation.
 *
 * @see SymbolTable
 */
public void addUnparsedEntity(String name,
String publicId, String systemId,
String baseSystemId, String notation) {

    fCurrentEntity = fEntityManager.getCurrentEntity();
    if (!fEntities.containsKey(name)) {
        Entity entity = new Entity.ExternalEntity(name, new XMLResourceIdentifierImpl(publicId, systemId, baseSystemId, null), notation, fInExternalSubset);
        //                  (fCurrentEntity == null) ? fasle : fCurrentEntity.isEntityDeclInExternalSubset());
        //                  fCurrentEntity.isEntityDeclInExternalSubset());
        fEntities.put(name, entity);
    }
    else{
        if(fWarnDuplicateEntityDef){
            fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
            "MSG_DUPLICATE_ENTITY_DEFINITION",
            new Object[]{ name },
            XMLErrorReporter.SEVERITY_WARNING );
        }
    }
}
 
Example #19
Source File: XIncludeHandler.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
public XIncludeHandler() {
    fDepth = 0;

    fSawFallback[fDepth] = false;
    fSawInclude[fDepth] = false;
    fState[fDepth] = STATE_NORMAL_PROCESSING;
    fNotations = new ArrayList();
    fUnparsedEntities = new ArrayList();

    fBaseURIScope = new IntStack();
    fBaseURI = new Stack();
    fLiteralSystemID = new Stack();
    fExpandedSystemID = new Stack();
    fCurrentBaseURI = new XMLResourceIdentifierImpl();

    fLanguageScope = new IntStack();
    fLanguageStack = new Stack();
    fCurrentLanguage = null;
}
 
Example #20
Source File: XMLEntityStorage.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Adds an unparsed entity declaration.
 * <p>
 * <strong>Note:</strong> This method ignores subsequent entity
 * declarations.
 * <p>
 * <strong>Note:</strong> The name should be a unique symbol. The
 * SymbolTable can be used for this purpose.
 *
 * @param name     The name of the entity.
 * @param publicId The public identifier of the entity.
 * @param systemId The system identifier of the entity.
 * @param notation The name of the notation.
 *
 * @see SymbolTable
 */
public void addUnparsedEntity(String name,
String publicId, String systemId,
String baseSystemId, String notation) {

    fCurrentEntity = fEntityManager.getCurrentEntity();
    if (!fEntities.containsKey(name)) {
        Entity entity = new Entity.ExternalEntity(name, new XMLResourceIdentifierImpl(publicId, systemId, baseSystemId, null), notation, fInExternalSubset);
        //                  (fCurrentEntity == null) ? fasle : fCurrentEntity.isEntityDeclInExternalSubset());
        //                  fCurrentEntity.isEntityDeclInExternalSubset());
        fEntities.put(name, entity);
    }
    else{
        if(fWarnDuplicateEntityDef){
            fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
            "MSG_DUPLICATE_ENTITY_DEFINITION",
            new Object[]{ name },
            XMLErrorReporter.SEVERITY_WARNING );
        }
    }
}
 
Example #21
Source File: XIncludeHandler.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * The purpose of this method is to check if a Notation conflicts with a previously
 * declared notation in the current pipeline stack.  If there is no conflict, the
 * Notation is sent by the root pipeline.
 *
 * @param not the Notation to check for conflicts
 */
protected void checkAndSendNotation(Notation not) {
    if (isRootDocument()) {
        int index = fNotations.indexOf(not);
        if (index == -1) {
            // There is no notation with the same name that we have sent.
            XMLResourceIdentifier id =
                new XMLResourceIdentifierImpl(
                    not.publicId,
                    not.systemId,
                    not.baseURI,
                    not.expandedSystemId);
            addNotation(not.name, id, not.augmentations);
            if (fSendUEAndNotationEvents && fDTDHandler != null) {
                fDTDHandler.notationDecl(not.name, id, not.augmentations);
            }
        }
        else {
            Notation localNotation = (Notation)fNotations.get(index);
            if (!not.isDuplicate(localNotation)) {
                reportFatalError(
                    "NonDuplicateNotation",
                    new Object[] { not.name });
            }
        }
    }
    else {
        fParentXIncludeHandler.checkAndSendNotation(not);
    }
}
 
Example #22
Source File: XIncludeHandler.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * The purpose of this method is to check if a Notation conflicts with a previously
 * declared notation in the current pipeline stack.  If there is no conflict, the
 * Notation is sent by the root pipeline.
 *
 * @param not the Notation to check for conflicts
 */
protected void checkAndSendNotation(Notation not) {
    if (isRootDocument()) {
        int index = fNotations.indexOf(not);
        if (index == -1) {
            // There is no notation with the same name that we have sent.
            XMLResourceIdentifier id =
                new XMLResourceIdentifierImpl(
                    not.publicId,
                    not.systemId,
                    not.baseURI,
                    not.expandedSystemId);
            addNotation(not.name, id, not.augmentations);
            if (fSendUEAndNotationEvents && fDTDHandler != null) {
                fDTDHandler.notationDecl(not.name, id, not.augmentations);
            }
        }
        else {
            Notation localNotation = (Notation)fNotations.get(index);
            if (!not.isDuplicate(localNotation)) {
                reportFatalError(
                    "NonDuplicateNotation",
                    new Object[] { not.name });
            }
        }
    }
    else {
        fParentXIncludeHandler.checkAndSendNotation(not);
    }
}
 
Example #23
Source File: XIncludeHandler.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
/**
 * The purpose of this method is to check if a Notation conflicts with a previously
 * declared notation in the current pipeline stack.  If there is no conflict, the
 * Notation is sent by the root pipeline.
 *
 * @param not the Notation to check for conflicts
 */
protected void checkAndSendNotation(Notation not) {
    if (isRootDocument()) {
        int index = fNotations.indexOf(not);
        if (index == -1) {
            // There is no notation with the same name that we have sent.
            XMLResourceIdentifier id =
                new XMLResourceIdentifierImpl(
                    not.publicId,
                    not.systemId,
                    not.baseURI,
                    not.expandedSystemId);
            addNotation(not.name, id, not.augmentations);
            if (fSendUEAndNotationEvents && fDTDHandler != null) {
                fDTDHandler.notationDecl(not.name, id, not.augmentations);
            }
        }
        else {
            Notation localNotation = (Notation)fNotations.get(index);
            if (!not.isDuplicate(localNotation)) {
                reportFatalError(
                    "NonDuplicateNotation",
                    new Object[] { not.name });
            }
        }
    }
    else {
        fParentXIncludeHandler.checkAndSendNotation(not);
    }
}
 
Example #24
Source File: XIncludeHandler.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * The purpose of this method is to check if a Notation conflicts with a previously
 * declared notation in the current pipeline stack.  If there is no conflict, the
 * Notation is sent by the root pipeline.
 *
 * @param not the Notation to check for conflicts
 */
protected void checkAndSendNotation(Notation not) {
    if (isRootDocument()) {
        int index = fNotations.indexOf(not);
        if (index == -1) {
            // There is no notation with the same name that we have sent.
            XMLResourceIdentifier id =
                new XMLResourceIdentifierImpl(
                    not.publicId,
                    not.systemId,
                    not.baseURI,
                    not.expandedSystemId);
            addNotation(not.name, id, not.augmentations);
            if (fSendUEAndNotationEvents && fDTDHandler != null) {
                fDTDHandler.notationDecl(not.name, id, not.augmentations);
            }
        }
        else {
            Notation localNotation = (Notation)fNotations.get(index);
            if (!not.isDuplicate(localNotation)) {
                reportFatalError(
                    "NonDuplicateNotation",
                    new Object[] { not.name });
            }
        }
    }
    else {
        fParentXIncludeHandler.checkAndSendNotation(not);
    }
}
 
Example #25
Source File: XIncludeHandler.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * The purpose of this method is to check if a Notation conflicts with a previously
 * declared notation in the current pipeline stack.  If there is no conflict, the
 * Notation is sent by the root pipeline.
 *
 * @param not the Notation to check for conflicts
 */
protected void checkAndSendNotation(Notation not) {
    if (isRootDocument()) {
        int index = fNotations.indexOf(not);
        if (index == -1) {
            // There is no notation with the same name that we have sent.
            XMLResourceIdentifier id =
                new XMLResourceIdentifierImpl(
                    not.publicId,
                    not.systemId,
                    not.baseURI,
                    not.expandedSystemId);
            addNotation(not.name, id, not.augmentations);
            if (fSendUEAndNotationEvents && fDTDHandler != null) {
                fDTDHandler.notationDecl(not.name, id, not.augmentations);
            }
        }
        else {
            Notation localNotation = (Notation)fNotations.get(index);
            if (!not.isDuplicate(localNotation)) {
                reportFatalError(
                    "NonDuplicateNotation",
                    new Object[] { not.name });
            }
        }
    }
    else {
        fParentXIncludeHandler.checkAndSendNotation(not);
    }
}
 
Example #26
Source File: XIncludeHandler.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
/**
 * The purpose of this method is to check if an UnparsedEntity conflicts with a previously
 * declared entity in the current pipeline stack.  If there is no conflict, the
 * UnparsedEntity is sent by the root pipeline.
 *
 * @param ent the UnparsedEntity to check for conflicts
 */
protected void checkAndSendUnparsedEntity(UnparsedEntity ent) {
    if (isRootDocument()) {
        int index = fUnparsedEntities.indexOf(ent);
        if (index == -1) {
            // There is no unparsed entity with the same name that we have sent.
            // Calling unparsedEntityDecl() will add the entity to our local store,
            // and also send the unparsed entity to the DTDHandler
            XMLResourceIdentifier id =
                new XMLResourceIdentifierImpl(
                    ent.publicId,
                    ent.systemId,
                    ent.baseURI,
                    ent.expandedSystemId);
            addUnparsedEntity(
                ent.name,
                id,
                ent.notation,
                ent.augmentations);
            if (fSendUEAndNotationEvents && fDTDHandler != null) {
                fDTDHandler.unparsedEntityDecl(
                    ent.name,
                    id,
                    ent.notation,
                    ent.augmentations);
            }
        }
        else {
            UnparsedEntity localEntity = fUnparsedEntities.get(index);
            if (!ent.isDuplicate(localEntity)) {
                reportFatalError(
                    "NonDuplicateUnparsedEntity",
                    new Object[] { ent.name });
            }
        }
    }
    else {
        fParentXIncludeHandler.checkAndSendUnparsedEntity(ent);
    }
}
 
Example #27
Source File: XIncludeHandler.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
/**
 * The purpose of this method is to check if a Notation conflicts with a previously
 * declared notation in the current pipeline stack.  If there is no conflict, the
 * Notation is sent by the root pipeline.
 *
 * @param not the Notation to check for conflicts
 */
protected void checkAndSendNotation(Notation not) {
    if (isRootDocument()) {
        int index = fNotations.indexOf(not);
        if (index == -1) {
            // There is no notation with the same name that we have sent.
            XMLResourceIdentifier id =
                new XMLResourceIdentifierImpl(
                    not.publicId,
                    not.systemId,
                    not.baseURI,
                    not.expandedSystemId);
            addNotation(not.name, id, not.augmentations);
            if (fSendUEAndNotationEvents && fDTDHandler != null) {
                fDTDHandler.notationDecl(not.name, id, not.augmentations);
            }
        }
        else {
            Notation localNotation = fNotations.get(index);
            if (!not.isDuplicate(localNotation)) {
                reportFatalError(
                    "NonDuplicateNotation",
                    new Object[] { not.name });
            }
        }
    }
    else {
        fParentXIncludeHandler.checkAndSendNotation(not);
    }
}
 
Example #28
Source File: XIncludeHandler.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * The purpose of this method is to check if a Notation conflicts with a previously
 * declared notation in the current pipeline stack.  If there is no conflict, the
 * Notation is sent by the root pipeline.
 *
 * @param not the Notation to check for conflicts
 */
protected void checkAndSendNotation(Notation not) {
    if (isRootDocument()) {
        int index = fNotations.indexOf(not);
        if (index == -1) {
            // There is no notation with the same name that we have sent.
            XMLResourceIdentifier id =
                new XMLResourceIdentifierImpl(
                    not.publicId,
                    not.systemId,
                    not.baseURI,
                    not.expandedSystemId);
            addNotation(not.name, id, not.augmentations);
            if (fSendUEAndNotationEvents && fDTDHandler != null) {
                fDTDHandler.notationDecl(not.name, id, not.augmentations);
            }
        }
        else {
            Notation localNotation = (Notation)fNotations.get(index);
            if (!not.isDuplicate(localNotation)) {
                reportFatalError(
                    "NonDuplicateNotation",
                    new Object[] { not.name });
            }
        }
    }
    else {
        fParentXIncludeHandler.checkAndSendNotation(not);
    }
}
 
Example #29
Source File: XIncludeHandler.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * The purpose of this method is to check if a Notation conflicts with a previously
 * declared notation in the current pipeline stack.  If there is no conflict, the
 * Notation is sent by the root pipeline.
 *
 * @param not the Notation to check for conflicts
 */
protected void checkAndSendNotation(Notation not) {
    if (isRootDocument()) {
        int index = fNotations.indexOf(not);
        if (index == -1) {
            // There is no notation with the same name that we have sent.
            XMLResourceIdentifier id =
                new XMLResourceIdentifierImpl(
                    not.publicId,
                    not.systemId,
                    not.baseURI,
                    not.expandedSystemId);
            addNotation(not.name, id, not.augmentations);
            if (fSendUEAndNotationEvents && fDTDHandler != null) {
                fDTDHandler.notationDecl(not.name, id, not.augmentations);
            }
        }
        else {
            Notation localNotation = (Notation)fNotations.get(index);
            if (!not.isDuplicate(localNotation)) {
                reportFatalError(
                    "NonDuplicateNotation",
                    new Object[] { not.name });
            }
        }
    }
    else {
        fParentXIncludeHandler.checkAndSendNotation(not);
    }
}
 
Example #30
Source File: XIncludeHandler.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * The purpose of this method is to check if a Notation conflicts with a previously
 * declared notation in the current pipeline stack.  If there is no conflict, the
 * Notation is sent by the root pipeline.
 *
 * @param not the Notation to check for conflicts
 */
protected void checkAndSendNotation(Notation not) {
    if (isRootDocument()) {
        int index = fNotations.indexOf(not);
        if (index == -1) {
            // There is no notation with the same name that we have sent.
            XMLResourceIdentifier id =
                new XMLResourceIdentifierImpl(
                    not.publicId,
                    not.systemId,
                    not.baseURI,
                    not.expandedSystemId);
            addNotation(not.name, id, not.augmentations);
            if (fSendUEAndNotationEvents && fDTDHandler != null) {
                fDTDHandler.notationDecl(not.name, id, not.augmentations);
            }
        }
        else {
            Notation localNotation = (Notation)fNotations.get(index);
            if (!not.isDuplicate(localNotation)) {
                reportFatalError(
                    "NonDuplicateNotation",
                    new Object[] { not.name });
            }
        }
    }
    else {
        fParentXIncludeHandler.checkAndSendNotation(not);
    }
}