• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java XMLErrorReporter类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.sun.org.apache.xerces.internal.impl.XMLErrorReporter的典型用法代码示例。如果您正苦于以下问题:Java XMLErrorReporter类的具体用法?Java XMLErrorReporter怎么用?Java XMLErrorReporter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



XMLErrorReporter类属于com.sun.org.apache.xerces.internal.impl包,在下文中一共展示了XMLErrorReporter类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: addUnparsedEntity

import com.sun.org.apache.xerces.internal.impl.XMLErrorReporter; //导入依赖的package包/类
/**
 * 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 );
        }
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:37,代码来源:XMLEntityStorage.java


示例2: SchemaValidatorConfiguration

import com.sun.org.apache.xerces.internal.impl.XMLErrorReporter; //导入依赖的package包/类
public SchemaValidatorConfiguration(XMLComponentManager parentManager,
        XSGrammarPoolContainer grammarContainer, ValidationManager validationManager) {
    fParentComponentManager = parentManager;
    fGrammarPool = grammarContainer.getGrammarPool();
    fUseGrammarPoolOnly = grammarContainer.isFullyComposed();
    fValidationManager = validationManager;
    // add schema message formatter to error reporter
    try {
        XMLErrorReporter errorReporter = (XMLErrorReporter) fParentComponentManager.getProperty(ERROR_REPORTER);
        if (errorReporter != null) {
            errorReporter.putMessageFormatter(XSMessageFormatter.SCHEMA_DOMAIN, new XSMessageFormatter());
        }
    }
    // Ignore exception.
    catch (XMLConfigurationException exc) {}
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:17,代码来源:SchemaValidatorConfiguration.java


示例3: reset

import com.sun.org.apache.xerces.internal.impl.XMLErrorReporter; //导入依赖的package包/类
public void reset(PropertyManager propertyManager) {
    init();
    // Xerces properties
    fSymbolTable = (SymbolTable)propertyManager.getProperty(Constants.XERCES_PROPERTY_PREFIX + Constants.SYMBOL_TABLE_PROPERTY);

    fErrorReporter = (XMLErrorReporter)propertyManager.getProperty(Constants.XERCES_PROPERTY_PREFIX + Constants.ERROR_REPORTER_PROPERTY);

    fEntityManager = (XMLEntityManager)propertyManager.getProperty(ENTITY_MANAGER);
    fEntityStore = fEntityManager.getEntityStore() ;
    fEntityScanner = (XMLEntityScanner)fEntityManager.getEntityScanner() ;
    fSecurityManager = (XMLSecurityManager)propertyManager.getProperty(SECURITY_MANAGER);

    //fEntityManager.reset();
    // DTD preparsing defaults:
    fValidation = false;
    fNotifyCharRefs = false;

}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:19,代码来源:XMLScanner.java


示例4: startPE

import com.sun.org.apache.xerces.internal.impl.XMLErrorReporter; //导入依赖的package包/类
/**
 * start a parameter entity dealing with the textdecl if there is any
 *
 * @param name The name of the parameter entity to start (without the '%')
 * @param literal Whether this is happening within a literal
 */
protected void startPE(String name, boolean literal)
throws IOException, XNIException {
    int depth = fPEDepth;
    String pName = "%"+name;
    if (fValidation && !fEntityStore.isDeclaredEntity(pName)) {
        fErrorReporter.reportError( XMLMessageFormatter.XML_DOMAIN,"EntityNotDeclared",
        new Object[]{name}, XMLErrorReporter.SEVERITY_ERROR);
    }
    fEntityManager.startEntity(fSymbolTable.addSymbol(pName),
    literal);
    // if we actually got a new entity and it's external
    // parse text decl if there is any
    if (depth != fPEDepth && fEntityScanner.isExternal()) {
        scanTextDecl();
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:23,代码来源:XMLDTDScannerImpl.java


示例5: elementDecl

import com.sun.org.apache.xerces.internal.impl.XMLErrorReporter; //导入依赖的package包/类
/**
 * 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 {

    //check VC: Unique Element Declaration
    if (fValidation) {
        if (fDTDElementDecls.contains(name)) {
            fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
                                       "MSG_ELEMENT_ALREADY_DECLARED",
                                       new Object[]{ name},
                                       XMLErrorReporter.SEVERITY_ERROR);
        }
        else {
            fDTDElementDecls.add(name);
        }
    }

    // call handlers
    if(fDTDGrammar != null )
        fDTDGrammar.elementDecl(name, contentModel, augs);
    if (fDTDHandler != null) {
        fDTDHandler.elementDecl(name, contentModel, augs);
    }

}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:35,代码来源:XMLDTDProcessor.java


示例6: notationDecl

import com.sun.org.apache.xerces.internal.impl.XMLErrorReporter; //导入依赖的package包/类
/**
 * 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 {

    // VC: Unique Notation Name
    if (fValidation) {
        DTDGrammar grammar = (fDTDGrammar != null ? fDTDGrammar : fGrammarBucket.getActiveGrammar());
        if (grammar.getNotationDeclIndex(name) != -1) {
            fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
                                       "UniqueNotationName",
                                       new Object[]{name},
                                       XMLErrorReporter.SEVERITY_ERROR);
        }
    }

    // call handlers
    if(fDTDGrammar != null)
        fDTDGrammar.notationDecl(name, identifier, augs);
    if (fDTDHandler != null) {
        fDTDHandler.notationDecl(name, identifier, augs);
    }

}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:34,代码来源:XMLDTDProcessor.java


示例7: element

import com.sun.org.apache.xerces.internal.impl.XMLErrorReporter; //导入依赖的package包/类
/**
 * A referenced element in a mixed or children content model.
 *
 * @param elementName The name of the referenced element.
 * @param augs Additional information that may include infoset
 *                      augmentations.
 *
 * @throws XNIException Thrown by handler to signal an error.
 */
public void element(String elementName, Augmentations augs) throws XNIException {

    // check VC: No duplicate Types, in a single mixed-content declaration
    if (fMixed && fValidation) {
        if (fMixedElementTypes.contains(elementName)) {
            fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
                                       "DuplicateTypeInMixedContent",
                                       new Object[]{fDTDElementDeclName, elementName},
                                       XMLErrorReporter.SEVERITY_ERROR);
        }
        else {
            fMixedElementTypes.add(elementName);
        }
    }

    // call handlers
    if(fDTDGrammar != null)
        fDTDGrammar.element(elementName, augs);
    if (fDTDContentModelHandler != null) {
        fDTDContentModelHandler.element(elementName, augs);
    }

}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:33,代码来源:XMLDTDProcessor.java


示例8: comment

import com.sun.org.apache.xerces.internal.impl.XMLErrorReporter; //导入依赖的package包/类
/**
 * 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 {
    // fixes E15.1
    if (fPerformValidation && fElementDepth >= 0 && fDTDGrammar != null) {
        fDTDGrammar.getElementDecl(fCurrentElementIndex, fTempElementDecl);
        if (fTempElementDecl.type == XMLElementDecl.TYPE_EMPTY) {
                fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
                                           "MSG_CONTENT_INVALID_SPECIFIED",
                                           new Object[]{ fCurrentElement.rawname,
                                                         "EMPTY",
                                                         "comment"},
                                           XMLErrorReporter.SEVERITY_ERROR);
        }
    }
    // call handlers
    if (fDocumentHandler != null) {
        fDocumentHandler.comment(text, augs);
    }

}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:28,代码来源:XMLDTDValidator.java


示例9: processingInstruction

import com.sun.org.apache.xerces.internal.impl.XMLErrorReporter; //导入依赖的package包/类
/**
 * A processing instruction. Processing instructions consist of a
 * target name and, optionally, text data. The data is only meaningful
 * to the application.
 * <p>
 * Typically, a processing instruction's data will contain a series
 * of pseudo-attributes. These pseudo-attributes follow the form of
 * element attributes but are <strong>not</strong> parsed or presented
 * to the application as anything other than text. The application is
 * responsible for parsing the data.
 *
 * @param target The target.
 * @param data   The data or null if none specified.
 * @param augs   Additional information that may include infoset augmentations
 *
 * @throws XNIException Thrown by handler to signal an error.
 */
public void processingInstruction(String target, XMLString data, Augmentations augs)
throws XNIException {

    // fixes E15.1
    if (fPerformValidation && fElementDepth >= 0 && fDTDGrammar != null) {
        fDTDGrammar.getElementDecl(fCurrentElementIndex, fTempElementDecl);
        if (fTempElementDecl.type == XMLElementDecl.TYPE_EMPTY) {
                fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
                                           "MSG_CONTENT_INVALID_SPECIFIED",
                                           new Object[]{ fCurrentElement.rawname,
                                                         "EMPTY",
                                                         "processing instruction"},
                                           XMLErrorReporter.SEVERITY_ERROR);
        }
    }
    // call handlers
    if (fDocumentHandler != null) {
        fDocumentHandler.processingInstruction(target, data, augs);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:38,代码来源:XMLDTDValidator.java


示例10: startGeneralEntity

import com.sun.org.apache.xerces.internal.impl.XMLErrorReporter; //导入依赖的package包/类
/**
 * This method notifies the start of a general entity.
 * <p>
 * <strong>Note:</strong> This method is not called for entity references
 * appearing as part of attribute values.
 *
 * @param name     The name of the general 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
 *
 * @exception XNIException Thrown by handler to signal an error.
 */
public void startGeneralEntity(String name,
                               XMLResourceIdentifier identifier,
                               String encoding,
                               Augmentations augs) throws XNIException {
    if (fPerformValidation && fElementDepth >= 0 && fDTDGrammar != null) {
        fDTDGrammar.getElementDecl(fCurrentElementIndex, fTempElementDecl);
        // fixes E15.1
        if (fTempElementDecl.type == XMLElementDecl.TYPE_EMPTY) {
            fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
                                       "MSG_CONTENT_INVALID_SPECIFIED",
                                       new Object[]{ fCurrentElement.rawname,
                                                     "EMPTY", "ENTITY"},
                                       XMLErrorReporter.SEVERITY_ERROR);
        }
        if (fGrammarBucket.getStandalone()) {
            XMLDTDLoader.checkStandaloneEntityRef(name, fDTDGrammar, fEntityDecl, fErrorReporter);
        }
    }
    if (fDocumentHandler != null) {
        fDocumentHandler.startGeneralEntity(name, identifier, encoding, augs);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:40,代码来源:XMLDTDValidator.java


示例11: loadSchema

import com.sun.org.apache.xerces.internal.impl.XMLErrorReporter; //导入依赖的package包/类
/**
 * This method is called either from XMLGrammarLoader.loadGrammar or from XMLSchemaValidator.
 * Note: in either case, the EntityManager (or EntityResolvers) are not going to be invoked
 * to resolve the location of the schema in XSDDescription
 * @param desc
 * @param source
 * @param locationPairs
 * @return An XML Schema grammar
 * @throws IOException
 * @throws XNIException
 */
SchemaGrammar loadSchema(XSDDescription desc,
        XMLInputSource source,
        Map locationPairs) throws IOException, XNIException {

    // this should only be done once per invocation of this object;
    // unless application alters JAXPSource in the mean time.
    if(!fJAXPProcessed) {
        processJAXPSchemaSource(locationPairs);
    }

    if (desc.isExternal()) {
        String accessError = SecuritySupport.checkAccess(desc.getExpandedSystemId(), faccessExternalSchema, Constants.ACCESS_EXTERNAL_ALL);
        if (accessError != null) {
            throw new XNIException(fErrorReporter.reportError(XSMessageFormatter.SCHEMA_DOMAIN,
                    "schema_reference.access",
                    new Object[] { SecuritySupport.sanitizePath(desc.getExpandedSystemId()), accessError }, XMLErrorReporter.SEVERITY_ERROR));
        }
    }
    SchemaGrammar grammar = fSchemaHandler.parseSchema(source, desc, locationPairs);

    return grammar;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:34,代码来源:XMLSchemaLoader.java


示例12: initGrammarBucket

import com.sun.org.apache.xerces.internal.impl.XMLErrorReporter; //导入依赖的package包/类
private void initGrammarBucket(){
    if(fGrammarPool != null) {
        Grammar [] initialGrammars = fGrammarPool.retrieveInitialGrammarSet(XMLGrammarDescription.XML_SCHEMA);
        for (int i = 0; i < initialGrammars.length; i++) {
            // put this grammar into the bucket, along with grammars
            // imported by it (directly or indirectly)
            if (!fGrammarBucket.putGrammar((SchemaGrammar)(initialGrammars[i]), true)) {
                // REVISIT: a conflict between new grammar(s) and grammars
                // in the bucket. What to do? A warning? An exception?
                fErrorReporter.reportError(XSMessageFormatter.SCHEMA_DOMAIN,
                        "GrammarConflict", null,
                        XMLErrorReporter.SEVERITY_WARNING);
            }
        }
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:17,代码来源:XMLSchemaLoader.java


示例13: startDocument

import com.sun.org.apache.xerces.internal.impl.XMLErrorReporter; //导入依赖的package包/类
public void startDocument(XMLLocator locator, String encoding,
        NamespaceContext namespaceContext, Augmentations augs)
throws XNIException {
    fErrorReporter = (XMLErrorReporter)config.getProperty(ERROR_REPORTER);
    fGenerateSyntheticAnnotation = config.getFeature(GENERATE_SYNTHETIC_ANNOTATION);
    fHasNonSchemaAttributes.clear();
    fSawAnnotation.clear();
    schemaDOM = new SchemaDOM();
    fCurrentAnnotationElement = null;
    fAnnotationDepth = -1;
    fInnerAnnotationDepth = -1;
    fDepth = -1;
    fLocator = locator;
    fNamespaceContext = namespaceContext;
    schemaDOM.setDocumentURI(locator.getExpandedSystemId());
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:17,代码来源:SchemaDOMParser.java


示例14: setProperty

import com.sun.org.apache.xerces.internal.impl.XMLErrorReporter; //导入依赖的package包/类
/**
 * Sets the value of a property. This method is called by the component
 * manager any time after reset when a property changes value.
 * <p>
 * <strong>Note:</strong> Components should silently ignore properties
 * that do not affect the operation of the component.
 *
 * @param propertyId The property identifier.
 * @param value      The value of the property.
 *
 * @throws SAXNotRecognizedException The component should not throw
 *                                   this exception.
 * @throws SAXNotSupportedException The component should not throw
 *                                  this exception.
 */
public void setProperty(String propertyId, Object value)
    throws XMLConfigurationException {

    // Xerces properties
    if (propertyId.startsWith(Constants.XERCES_PROPERTY_PREFIX)) {
            final int suffixLength = propertyId.length() - Constants.XERCES_PROPERTY_PREFIX.length();

        if (suffixLength == Constants.SECURITY_MANAGER_PROPERTY.length() &&
            propertyId.endsWith(Constants.SECURITY_MANAGER_PROPERTY)) {
            fSecurityManager = (XMLSecurityManager)value;
            maxNodeLimit = (fSecurityManager != null) ?
                    fSecurityManager.getLimit(XMLSecurityManager.Limit.MAX_OCCUR_NODE_LIMIT) * MULTIPLICITY : 0 ;
            return;
        }
        if (suffixLength == Constants.ERROR_REPORTER_PROPERTY.length() &&
            propertyId.endsWith(Constants.ERROR_REPORTER_PROPERTY)) {
            fErrorReporter = (XMLErrorReporter)value;
            return;
        }
    }

}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:38,代码来源:CMNodeFactory.java


示例15: storeLocations

import com.sun.org.apache.xerces.internal.impl.XMLErrorReporter; //导入依赖的package包/类
void storeLocations(String sLocation, String nsLocation) {
    if (sLocation != null) {
        if (!XMLSchemaLoader.tokenizeSchemaLocationStr(sLocation, fLocationPairs)) {
            // error!
            fXSIErrorReporter.reportError(
                XSMessageFormatter.SCHEMA_DOMAIN,
                "SchemaLocation",
                new Object[] { sLocation },
                XMLErrorReporter.SEVERITY_WARNING);
        }
    }
    if (nsLocation != null) {
        XMLSchemaLoader.LocationArray la =
            ((XMLSchemaLoader.LocationArray) fLocationPairs.get(XMLSymbols.EMPTY_STRING));
        if (la == null) {
            la = new XMLSchemaLoader.LocationArray();
            fLocationPairs.put(XMLSymbols.EMPTY_STRING, la);
        }
        la.addLocation(nsLocation);
    }

}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:23,代码来源:XMLSchemaValidator.java


示例16: addUnparsedEntity

import com.sun.org.apache.xerces.internal.impl.XMLErrorReporter; //导入依赖的package包/类
/**
 * 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 );
        }
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:37,代码来源:XMLEntityStorage.java


示例17: loadSchema

import com.sun.org.apache.xerces.internal.impl.XMLErrorReporter; //导入依赖的package包/类
/**
 * This method is called either from XMLGrammarLoader.loadGrammar or from XMLSchemaValidator.
 * Note: in either case, the EntityManager (or EntityResolvers) are not going to be invoked
 * to resolve the location of the schema in XSDDescription
 * @param desc
 * @param source
 * @param locationPairs
 * @return An XML Schema grammar
 * @throws IOException
 * @throws XNIException
 */
SchemaGrammar loadSchema(XSDDescription desc, XMLInputSource source,
        Map<String, LocationArray> locationPairs) throws IOException, XNIException {

    // this should only be done once per invocation of this object;
    // unless application alters JAXPSource in the mean time.
    if(!fJAXPProcessed) {
        processJAXPSchemaSource(locationPairs);
    }

    if (desc.isExternal() && !source.isCreatedByResolver()) {
        String accessError = SecuritySupport.checkAccess(desc.getExpandedSystemId(), faccessExternalSchema, Constants.ACCESS_EXTERNAL_ALL);
        if (accessError != null) {
            throw new XNIException(fErrorReporter.reportError(XSMessageFormatter.SCHEMA_DOMAIN,
                    "schema_reference.access",
                    new Object[] { SecuritySupport.sanitizePath(desc.getExpandedSystemId()), accessError }, XMLErrorReporter.SEVERITY_ERROR));
        }
    }
    SchemaGrammar grammar = fSchemaHandler.parseSchema(source, desc, locationPairs);

    return grammar;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:33,代码来源:XMLSchemaLoader.java


示例18: initGrammarBucket

import com.sun.org.apache.xerces.internal.impl.XMLErrorReporter; //导入依赖的package包/类
private void initGrammarBucket(){
    if(fGrammarPool != null) {
        Grammar [] initialGrammars = fGrammarPool.retrieveInitialGrammarSet(XMLGrammarDescription.XML_SCHEMA);
        final int length = (initialGrammars != null) ? initialGrammars.length : 0;
        for (int i = 0; i < length; ++i) {
            // put this grammar into the bucket, along with grammars
            // imported by it (directly or indirectly)
            if (!fGrammarBucket.putGrammar((SchemaGrammar)(initialGrammars[i]), true)) {
                // REVISIT: a conflict between new grammar(s) and grammars
                // in the bucket. What to do? A warning? An exception?
                fErrorReporter.reportError(XSMessageFormatter.SCHEMA_DOMAIN,
                        "GrammarConflict", null,
                        XMLErrorReporter.SEVERITY_WARNING);
            }
        }
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:18,代码来源:XMLSchemaLoader.java


示例19: XMLGrammarPreparser

import com.sun.org.apache.xerces.internal.impl.XMLErrorReporter; //导入依赖的package包/类
/**
 * Constructs a preparser using the specified symbol table.
 *
 * @param symbolTable The symbol table to use.
 */
public XMLGrammarPreparser (SymbolTable symbolTable) {
    fSymbolTable = symbolTable;

    fLoaders = new Hashtable();
    fErrorReporter = new XMLErrorReporter();
    setLocale(Locale.getDefault());
    fEntityResolver = new XMLEntityManager();
    // those are all the basic properties...
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:15,代码来源:XMLGrammarPreparser.java


示例20: DOMValidatorHelper

import com.sun.org.apache.xerces.internal.impl.XMLErrorReporter; //导入依赖的package包/类
public DOMValidatorHelper(XMLSchemaValidatorComponentManager componentManager) {
    fComponentManager = componentManager;
    fErrorReporter = (XMLErrorReporter) fComponentManager.getProperty(ERROR_REPORTER);
    fNamespaceContext = (NamespaceSupport) fComponentManager.getProperty(NAMESPACE_CONTEXT);
    fSchemaValidator = (XMLSchemaValidator) fComponentManager.getProperty(SCHEMA_VALIDATOR);
    fSymbolTable = (SymbolTable) fComponentManager.getProperty(SYMBOL_TABLE);
    fValidationManager = (ValidationManager) fComponentManager.getProperty(VALIDATION_MANAGER);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:9,代码来源:DOMValidatorHelper.java



注:本文中的com.sun.org.apache.xerces.internal.impl.XMLErrorReporter类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java RenameProcessor类代码示例发布时间:2022-05-23
下一篇:
Java StreamingMessages类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap