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

The following examples show how to use com.sun.org.apache.xerces.internal.util.SymbolTable. 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: XPath.java    From Bytecoder with Apache License 2.0 6 votes vote down vote up
/** Main program entry. */
public static void main(String[] argv) throws Exception {

    for (int i = 0; i < argv.length; i++) {
        final String expression = argv[i];
        System.out.println("# XPath expression: \""+expression+'"');
        try {
            SymbolTable symbolTable = new SymbolTable();
            XPath xpath = new XPath(expression, symbolTable, null);
            System.out.println("expanded xpath: \""+xpath.toString()+'"');
        }
        catch (XPathException e) {
            System.out.println("error: "+e.getMessage());
        }
    }

}
 
Example #2
Source File: SAXParser.java    From jdk1.8-source-analysis with Apache License 2.0 6 votes vote down vote up
/**
 * Constructs a SAX parser using the specified symbol table and
 * grammar pool.
 */
public SAXParser(SymbolTable symbolTable, XMLGrammarPool grammarPool) {
    super(new XIncludeAwareParserConfiguration());

    // set features
    fConfiguration.addRecognizedFeatures(RECOGNIZED_FEATURES);
    fConfiguration.setFeature(NOTIFY_BUILTIN_REFS, true);

    // set properties
    fConfiguration.addRecognizedProperties(RECOGNIZED_PROPERTIES);
    if (symbolTable != null) {
        fConfiguration.setProperty(SYMBOL_TABLE, symbolTable);
    }
    if (grammarPool != null) {
        fConfiguration.setProperty(XMLGRAMMAR_POOL, grammarPool);
    }

}
 
Example #3
Source File: Field.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
/** Constructs a field XPath expression. */
public XPath(String xpath,
             SymbolTable symbolTable,
             NamespaceContext context) throws XPathException {
    // NOTE: We have to prefix the field XPath with "./" in
    //       order to handle selectors such as "@attr" that
    //       select the attribute because the fields could be
    //       relative to the selector element. -Ac
    //       Unless xpath starts with a descendant node -Achille Fokoue
    //      ... or a / or a . - NG
    super(((xpath.trim().startsWith("/") ||xpath.trim().startsWith("."))?
            xpath:"./"+xpath),
          symbolTable, context);

    // verify that only one attribute is selected per branch
    for (int i=0;i<fLocationPaths.length;i++) {
        for(int j=0; j<fLocationPaths[i].steps.length; j++) {
            com.sun.org.apache.xerces.internal.impl.xpath.XPath.Axis axis =
                fLocationPaths[i].steps[j].axis;
            if (axis.type == XPath.Axis.ATTRIBUTE &&
                    (j < fLocationPaths[i].steps.length-1)) {
                throw new XPathException("c-fields-xpaths");
            }
        }
    }
}
 
Example #4
Source File: XMLEntityScanner.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Resets the component. The component can query the component manager
 * about any features and properties that affect the operation of the
 * component.
 *
 * @param componentManager The component manager.
 *
 * @throws SAXException Thrown by component on initialization error.
 *                      For example, if a feature or property is
 *                      required for the operation of the component, the
 *                      component manager may throw a
 *                      SAXNotRecognizedException or a
 *                      SAXNotSupportedException.
 */
public void reset(XMLComponentManager componentManager)
throws XMLConfigurationException {

    //System.out.println(" this is being called");
    // xerces features
    fAllowJavaEncodings = componentManager.getFeature(ALLOW_JAVA_ENCODINGS, false);

    //xerces properties
    fSymbolTable = (SymbolTable)componentManager.getProperty(SYMBOL_TABLE);
    fErrorReporter = (XMLErrorReporter)componentManager.getProperty(ERROR_REPORTER);
    fCurrentEntity = null;
    whiteSpaceLen = 0;
    whiteSpaceInfoNeeded = true;
    listeners.clear();
}
 
Example #5
Source File: CachingParserPool.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/** Creates a new SAX parser. */
public SAXParser createSAXParser() {
    SymbolTable symbolTable = fShadowSymbolTable
                            ? new ShadowedSymbolTable(fSynchronizedSymbolTable)
                            : fSynchronizedSymbolTable;
    XMLGrammarPool grammarPool = fShadowGrammarPool
                            ? new ShadowedGrammarPool(fSynchronizedGrammarPool)
                            : fSynchronizedGrammarPool;
    return new SAXParser(symbolTable, grammarPool);
}
 
Example #6
Source File: IntegratedParserConfiguration.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Constructs a parser configuration using the specified symbol table,
 * grammar pool, and parent settings.
 * <p>
 * <strong>REVISIT:</strong>
 * Grammar pool will be updated when the new validation engine is
 * implemented.
 *
 * @param symbolTable    The symbol table to use.
 * @param grammarPool    The grammar pool to use.
 * @param parentSettings The parent settings.
 */
public IntegratedParserConfiguration(SymbolTable symbolTable,
                                     XMLGrammarPool grammarPool,
                                     XMLComponentManager parentSettings) {
    super(symbolTable, grammarPool, parentSettings);

    // create components
    fNonNSScanner = new XMLDocumentScannerImpl();
    fNonNSDTDValidator = new XMLDTDValidator();

    // add components
    addComponent((XMLComponent)fNonNSScanner);
    addComponent((XMLComponent)fNonNSDTDValidator);

}
 
Example #7
Source File: Selector.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/** Constructs a selector XPath expression. */
public XPath(String xpath, SymbolTable symbolTable,
             NamespaceContext context) throws XPathException {
    super(normalize(xpath), symbolTable, context);
    // verify that an attribute is not selected
    for (int i=0;i<fLocationPaths.length;i++) {
        com.sun.org.apache.xerces.internal.impl.xpath.XPath.Axis axis =
        fLocationPaths[i].steps[fLocationPaths[i].steps.length-1].axis;
        if (axis.type == XPath.Axis.ATTRIBUTE) {
            throw new XPathException("c-selector-xpath");
        }
    }

}
 
Example #8
Source File: XIncludeParserConfiguration.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Constructs a parser configuration using the specified symbol table,
 * grammar pool, and parent settings.
 * <p>
 *
 * @param symbolTable    The symbol table to use.
 * @param grammarPool    The grammar pool to use.
 * @param parentSettings The parent settings.
 */
public XIncludeParserConfiguration(
    SymbolTable symbolTable,
    XMLGrammarPool grammarPool,
    XMLComponentManager parentSettings) {
    super(symbolTable, grammarPool, parentSettings);

    fXIncludeHandler = new XIncludeHandler();
    addCommonComponent(fXIncludeHandler);

    final String[] recognizedFeatures = {
        ALLOW_UE_AND_NOTATION_EVENTS,
        XINCLUDE_FIXUP_BASE_URIS,
        XINCLUDE_FIXUP_LANGUAGE
    };
    addRecognizedFeatures(recognizedFeatures);

    // add default recognized properties
    final String[] recognizedProperties =
        { XINCLUDE_HANDLER, NAMESPACE_CONTEXT };
    addRecognizedProperties(recognizedProperties);

    setFeature(ALLOW_UE_AND_NOTATION_EVENTS, true);
    setFeature(XINCLUDE_FIXUP_BASE_URIS, true);
    setFeature(XINCLUDE_FIXUP_LANGUAGE, true);

    setProperty(XINCLUDE_HANDLER, fXIncludeHandler);
    setProperty(NAMESPACE_CONTEXT, new XIncludeNamespaceSupport());
}
 
Example #9
Source File: SchemaContentHandler.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public void reset(SchemaDOMParser schemaDOMParser, SymbolTable symbolTable,
        boolean namespacePrefixes, boolean stringsInternalized) {
    fSchemaDOMParser = schemaDOMParser;
    fSymbolTable = symbolTable;
    fNamespacePrefixes = namespacePrefixes;
    fStringsInternalized = stringsInternalized;
}
 
Example #10
Source File: XMLDTDLoader.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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 {
    if (propertyId.equals(SYMBOL_TABLE)) {
        fSymbolTable = (SymbolTable)value;
        fDTDScanner.setProperty(propertyId, value);
        fEntityManager.setProperty(propertyId, value);
    }
    else if(propertyId.equals(ERROR_REPORTER)) {
        fErrorReporter = (XMLErrorReporter)value;
        // Add XML message formatter if there isn't one.
        if (fErrorReporter.getMessageFormatter(XMLMessageFormatter.XML_DOMAIN) == null) {
            XMLMessageFormatter xmft = new XMLMessageFormatter();
            fErrorReporter.putMessageFormatter(XMLMessageFormatter.XML_DOMAIN, xmft);
            fErrorReporter.putMessageFormatter(XMLMessageFormatter.XMLNS_DOMAIN, xmft);
        }
        fDTDScanner.setProperty(propertyId, value);
        fEntityManager.setProperty(propertyId, value);
    }
    else if (propertyId.equals(ERROR_HANDLER)) {
        fErrorReporter.setProperty(propertyId, value);
    }
    else if (propertyId.equals(ENTITY_RESOLVER)) {
        fEntityResolver = (XMLEntityResolver)value;
        fEntityManager.setProperty(propertyId, value);
    }
    else if (propertyId.equals(LOCALE)) {
        setLocale((Locale) value);
    }
    else if(propertyId.equals(GRAMMAR_POOL)) {
        fGrammarPool = (XMLGrammarPool)value;
    }
    else {
        throw new XMLConfigurationException(Status.NOT_RECOGNIZED, propertyId);
    }
}
 
Example #11
Source File: ValidatorHandlerImpl.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
public ValidatorHandlerImpl(XMLSchemaValidatorComponentManager componentManager) {
    fComponentManager = componentManager;
    fErrorReporter = (XMLErrorReporter) fComponentManager.getProperty(ERROR_REPORTER);
    fNamespaceContext = (NamespaceContext) fComponentManager.getProperty(NAMESPACE_CONTEXT);
    fSchemaValidator = (XMLSchemaValidator) fComponentManager.getProperty(SCHEMA_VALIDATOR);
    fSymbolTable = (SymbolTable) fComponentManager.getProperty(SYMBOL_TABLE);
    fValidationManager = (ValidationManager) fComponentManager.getProperty(VALIDATION_MANAGER);
}
 
Example #12
Source File: XMLEntityScanner.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public final void reset(SymbolTable symbolTable, XMLEntityManager entityManager,
        XMLErrorReporter reporter) {
    fCurrentEntity = null;
    fSymbolTable = symbolTable;
    fEntityManager = entityManager;
    fErrorReporter = reporter;
}
 
Example #13
Source File: DOMValidatorHelper.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
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);
}
 
Example #14
Source File: XMLDTDLoader.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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 {
    if (propertyId.equals(SYMBOL_TABLE)) {
        fSymbolTable = (SymbolTable)value;
        fDTDScanner.setProperty(propertyId, value);
        fEntityManager.setProperty(propertyId, value);
    }
    else if(propertyId.equals(ERROR_REPORTER)) {
        fErrorReporter = (XMLErrorReporter)value;
        // Add XML message formatter if there isn't one.
        if (fErrorReporter.getMessageFormatter(XMLMessageFormatter.XML_DOMAIN) == null) {
            XMLMessageFormatter xmft = new XMLMessageFormatter();
            fErrorReporter.putMessageFormatter(XMLMessageFormatter.XML_DOMAIN, xmft);
            fErrorReporter.putMessageFormatter(XMLMessageFormatter.XMLNS_DOMAIN, xmft);
        }
        fDTDScanner.setProperty(propertyId, value);
        fEntityManager.setProperty(propertyId, value);
    }
    else if (propertyId.equals(ERROR_HANDLER)) {
        fErrorReporter.setProperty(propertyId, value);
    }
    else if (propertyId.equals(ENTITY_RESOLVER)) {
        fEntityResolver = (XMLEntityResolver)value;
        fEntityManager.setProperty(propertyId, value);
    }
    else if (propertyId.equals(LOCALE)) {
        setLocale((Locale) value);
    }
    else if(propertyId.equals(GRAMMAR_POOL)) {
        fGrammarPool = (XMLGrammarPool)value;
    }
    else {
        throw new XMLConfigurationException(Status.NOT_RECOGNIZED, propertyId);
    }
}
 
Example #15
Source File: XPointerHandler.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
/**
 *
 */
public XPointerHandler() {
    super();

    fXPointerParts = new Vector();
    fSymbolTable = new SymbolTable();
}
 
Example #16
Source File: IntegratedParserConfiguration.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Constructs a parser configuration using the specified symbol table,
 * grammar pool, and parent settings.
 * <p>
 * <strong>REVISIT:</strong>
 * Grammar pool will be updated when the new validation engine is
 * implemented.
 *
 * @param symbolTable    The symbol table to use.
 * @param grammarPool    The grammar pool to use.
 * @param parentSettings The parent settings.
 */
public IntegratedParserConfiguration(SymbolTable symbolTable,
                                     XMLGrammarPool grammarPool,
                                     XMLComponentManager parentSettings) {
    super(symbolTable, grammarPool, parentSettings);

    // create components
    fNonNSScanner = new XMLDocumentScannerImpl();
    fNonNSDTDValidator = new XMLDTDValidator();

    // add components
    addComponent((XMLComponent)fNonNSScanner);
    addComponent((XMLComponent)fNonNSDTDValidator);

}
 
Example #17
Source File: XIncludeParserConfiguration.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
/**
 * Constructs a parser configuration using the specified symbol table,
 * grammar pool, and parent settings.
 * <p>
 *
 * @param symbolTable    The symbol table to use.
 * @param grammarPool    The grammar pool to use.
 * @param parentSettings The parent settings.
 */
public XIncludeParserConfiguration(
    SymbolTable symbolTable,
    XMLGrammarPool grammarPool,
    XMLComponentManager parentSettings) {
    super(symbolTable, grammarPool, parentSettings);

    fXIncludeHandler = new XIncludeHandler();
    addCommonComponent(fXIncludeHandler);

    final String[] recognizedFeatures = {
        ALLOW_UE_AND_NOTATION_EVENTS,
        XINCLUDE_FIXUP_BASE_URIS,
        XINCLUDE_FIXUP_LANGUAGE
    };
    addRecognizedFeatures(recognizedFeatures);

    // add default recognized properties
    final String[] recognizedProperties =
        { XINCLUDE_HANDLER, NAMESPACE_CONTEXT };
    addRecognizedProperties(recognizedProperties);

    setFeature(ALLOW_UE_AND_NOTATION_EVENTS, true);
    setFeature(XINCLUDE_FIXUP_BASE_URIS, true);
    setFeature(XINCLUDE_FIXUP_LANGUAGE, true);

    setProperty(XINCLUDE_HANDLER, fXIncludeHandler);
    setProperty(NAMESPACE_CONTEXT, new XIncludeNamespaceSupport());
}
 
Example #18
Source File: XPointerParserConfiguration.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Constructs a parser configuration using the specified symbol table,
 * grammar pool, and parent settings.
 * <p>
 *
 * @param symbolTable    The symbol table to use.
 * @param grammarPool    The grammar pool to use.
 * @param parentSettings The parent settings.
 */
public XPointerParserConfiguration(
    SymbolTable symbolTable,
    XMLGrammarPool grammarPool,
    XMLComponentManager parentSettings) {
    super(symbolTable, grammarPool, parentSettings);

    fXIncludeHandler = new XIncludeHandler();
    addCommonComponent(fXIncludeHandler);

    fXPointerHandler = new XPointerHandler();
    addCommonComponent(fXPointerHandler);

    final String[] recognizedFeatures = {
        ALLOW_UE_AND_NOTATION_EVENTS,
        XINCLUDE_FIXUP_BASE_URIS,
        XINCLUDE_FIXUP_LANGUAGE
    };
    addRecognizedFeatures(recognizedFeatures);

    // add default recognized properties
    final String[] recognizedProperties =
        { XINCLUDE_HANDLER, XPOINTER_HANDLER, NAMESPACE_CONTEXT };
    addRecognizedProperties(recognizedProperties);

    setFeature(ALLOW_UE_AND_NOTATION_EVENTS, true);
    setFeature(XINCLUDE_FIXUP_BASE_URIS, true);
    setFeature(XINCLUDE_FIXUP_LANGUAGE, true);

    setProperty(XINCLUDE_HANDLER, fXIncludeHandler);
    setProperty(XPOINTER_HANDLER, fXPointerHandler);
    setProperty(NAMESPACE_CONTEXT, new XIncludeNamespaceSupport());


}
 
Example #19
Source File: SchemaContentHandler.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public void reset(SchemaDOMParser schemaDOMParser, SymbolTable symbolTable,
        boolean namespacePrefixes, boolean stringsInternalized) {
    fSchemaDOMParser = schemaDOMParser;
    fSymbolTable = symbolTable;
    fNamespacePrefixes = namespacePrefixes;
    fStringsInternalized = stringsInternalized;
}
 
Example #20
Source File: DTDGrammarUtil.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public void reset(XMLComponentManager componentManager)
throws XMLConfigurationException {

    fDTDGrammar = null;
    fInElementContent = false;
    fCurrentElementIndex = -1;
    fCurrentContentSpecType = -1;
    fNamespaces = componentManager.getFeature(NAMESPACES, true);
    fSymbolTable = (SymbolTable) componentManager.getProperty(
            Constants.XERCES_PROPERTY_PREFIX + Constants.SYMBOL_TABLE_PROPERTY);
    fElementDepth = -1;
}
 
Example #21
Source File: XMLDTDProcessor.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
public void reset(XMLComponentManager componentManager) throws XMLConfigurationException {

        boolean parser_settings = componentManager.getFeature(PARSER_SETTINGS, true);

        if (!parser_settings) {
            // parser settings have not been changed
            reset();
            return;
        }

        // sax features
        fValidation = componentManager.getFeature(VALIDATION, false);

        fDTDValidation =
                !(componentManager
                    .getFeature(
                        Constants.XERCES_FEATURE_PREFIX + Constants.SCHEMA_VALIDATION_FEATURE, false));

        // Xerces features

        fWarnDuplicateAttdef = componentManager.getFeature(WARN_ON_DUPLICATE_ATTDEF, false);
        fWarnOnUndeclaredElemdef = componentManager.getFeature(WARN_ON_UNDECLARED_ELEMDEF, false);

        // get needed components
        fErrorReporter =
            (XMLErrorReporter) componentManager.getProperty(
                Constants.XERCES_PROPERTY_PREFIX + Constants.ERROR_REPORTER_PROPERTY);
        fSymbolTable =
            (SymbolTable) componentManager.getProperty(
                Constants.XERCES_PROPERTY_PREFIX + Constants.SYMBOL_TABLE_PROPERTY);

        fGrammarPool = (XMLGrammarPool) componentManager.getProperty(GRAMMAR_POOL, null);

        try {
            fValidator = (XMLDTDValidator) componentManager.getProperty(DTD_VALIDATOR, null);
        } catch (ClassCastException e) {
            fValidator = null;
        }
        // we get our grammarBucket from the validator...
        if (fValidator != null) {
            fGrammarBucket = fValidator.getGrammarBucket();
        } else {
            fGrammarBucket = null;
        }
        reset();

    }
 
Example #22
Source File: XMLSchemaLoader.java    From jdk1.8-source-analysis with Apache License 2.0 4 votes vote down vote up
public XMLSchemaLoader() {
    this( new SymbolTable(), null, new XMLEntityManager(), null, null, null);
}
 
Example #23
Source File: DOMParser.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Constructs a DOM parser using the specified symbol table.
 */
public DOMParser(SymbolTable symbolTable) {
    this(symbolTable, null);
}
 
Example #24
Source File: StAXSchemaParser.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
public void reset(SchemaDOMParser schemaDOMParser, SymbolTable symbolTable) {
    fSchemaDOMParser = schemaDOMParser;
    fSymbolTable = symbolTable;
    fNamespaceContext.setSymbolTable(fSymbolTable);
    fNamespaceContext.reset();
}
 
Example #25
Source File: XMLDTDLoader.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
public XMLDTDLoader(SymbolTable symbolTable,
            XMLGrammarPool grammarPool) {
    this(symbolTable, grammarPool, null, new XMLEntityManager());
}
 
Example #26
Source File: XMLDTDLoader.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
/** Deny default construction; we need a SymtolTable! */
public XMLDTDLoader() {
    this(new SymbolTable());
}
 
Example #27
Source File: XSDocumentInfo.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
XSDocumentInfo (Element schemaRoot, XSAttributeChecker attrChecker, SymbolTable symbolTable)
                throws XMLSchemaException {
    fSchemaElement = schemaRoot;
    initNamespaceSupport(schemaRoot);
    fIsChameleonSchema = false;

    fSymbolTable = symbolTable;
    fAttrChecker = attrChecker;

    if (schemaRoot != null) {
        Element root = schemaRoot;
        fSchemaAttrs = attrChecker.checkAttributes(root, true, this);
        // schemaAttrs == null means it's not an <xsd:schema> element
        // throw an exception, but we don't know the document systemId,
        // so we leave that to the caller.
        if (fSchemaAttrs == null) {
            throw new XMLSchemaException(null, null);
        }
        fAreLocalAttributesQualified =
            ((XInt)fSchemaAttrs[XSAttributeChecker.ATTIDX_AFORMDEFAULT]).intValue() == SchemaSymbols.FORM_QUALIFIED;
        fAreLocalElementsQualified =
            ((XInt)fSchemaAttrs[XSAttributeChecker.ATTIDX_EFORMDEFAULT]).intValue() == SchemaSymbols.FORM_QUALIFIED;
        fBlockDefault =
            ((XInt)fSchemaAttrs[XSAttributeChecker.ATTIDX_BLOCKDEFAULT]).shortValue();
        fFinalDefault =
            ((XInt)fSchemaAttrs[XSAttributeChecker.ATTIDX_FINALDEFAULT]).shortValue();
        fTargetNamespace =
            (String)fSchemaAttrs[XSAttributeChecker.ATTIDX_TARGETNAMESPACE];
        if (fTargetNamespace != null)
            fTargetNamespace = symbolTable.addSymbol(fTargetNamespace);

        fNamespaceSupportRoot = new SchemaNamespaceSupport(fNamespaceSupport);

        //set namespace support
        fValidationContext.setNamespaceSupport(fNamespaceSupport);
        fValidationContext.setSymbolTable(symbolTable);
        // pass null as the schema document, so that the namespace
        // context is not popped.

        // don't return the attribute array yet!
        //attrChecker.returnAttrArray(schemaAttrs, null);
    }
}
 
Example #28
Source File: BalancedDTDGrammar.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
/** Default constructor. */
public BalancedDTDGrammar(SymbolTable symbolTable, XMLDTDDescription desc) {
    super(symbolTable, desc);
}
 
Example #29
Source File: XML11DTDProcessor.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
public XML11DTDProcessor(SymbolTable symbolTable,
            XMLGrammarPool grammarPool) {
    super(symbolTable, grammarPool);
}
 
Example #30
Source File: XMLEntityScanner.java    From jdk1.8-source-analysis with Apache License 2.0 4 votes vote down vote up
/**
 * Resets the components.
 */
public void reset(PropertyManager propertyManager){
    fSymbolTable = (SymbolTable)propertyManager.getProperty(SYMBOL_TABLE) ;
    fErrorReporter = (XMLErrorReporter)propertyManager.getProperty(ERROR_REPORTER) ;
    resetCommon();
}