Package org.apache.xerces.util

Examples of org.apache.xerces.util.SymbolTable


     */
    public void reset(XMLComponentManager componentManager)
        throws XNIException {
       
        // get symbol table
        SymbolTable symbols = (SymbolTable)componentManager.getProperty(SYMBOL_TABLE);
       
        // symbolizes the strings
        XPath.Step[] steps = fLocationPath.steps;
        for (int i = 0; i < steps.length; i++) {
            QName name = steps[i].nodeTest.name;
            if (name.prefix != null) {
                name.prefix = symbols.addSymbol(name.prefix);
            }
            if (name.localpart != null) {
                name.localpart = symbols.addSymbol(name.localpart);
            }
            if (name.rawname != null) {
                name.rawname = symbols.addSymbol(name.rawname);
            }
            if (name.uri != null) {
                name.uri = symbols.addSymbol(name.uri);
            }
        }

        // reset namespace support
        fNamespaceContext.reset(symbols);
View Full Code Here


    /** Main program. */
    public static void main(String[] argv) throws Exception {

        if (DEBUG_ANY) {
            for (int i = 0; i < argv.length; i++) {
                final SymbolTable symbols = new SymbolTable();
                final String expr = argv[i];
                final XPath xpath = new XPath(expr, null);
                final XPathMatcher matcher = new XPathMatcher(xpath);
                matcher.reset(new XMLComponentManager() {
                    public boolean getFeature(String featureId) throws XMLConfigurationException {
View Full Code Here

        // features
        fNamespaces = fConfiguration.getFeature(NAMESPACES);
        fNamespacePrefixes = fConfiguration.getFeature(NAMESPACE_PREFIXES);

        // save needed symbols
        SymbolTable symbolTable = (SymbolTable)fConfiguration.getProperty(SYMBOL_TABLE);
        if (symbolTable != null) {
            fEmptySymbol = symbolTable.addSymbol("");
            fXmlnsSymbol = symbolTable.addSymbol("xmlns");
        }

    } // reset()
View Full Code Here

        };
        addRecognizedProperties(recognizedProperties);

        if (symbolTable == null) {
            if (fSymbolTable == null) {
                fSymbolTable = new SymbolTable();
                fProperties.put(SYMBOL_TABLE, fSymbolTable);
            }
        }
        else {
            fSymbolTable = symbolTable;
View Full Code Here

    // Constructors
    //

    /** Default constructor. */
    public CachingParserPool() {
        this(new SymbolTable(), new GrammarPool());
    } // <init>()
View Full Code Here

    // factory methods

    /** Creates a new DOM parser. */
    public DOMParser createDOMParser() {
        SymbolTable symbolTable = fShadowSymbolTable
                                ? new ShadowedSymbolTable(fSynchronizedSymbolTable)
                                : fSynchronizedSymbolTable;
        GrammarPool grammarPool = fShadowGrammarPool
                                ? new ShadowedGrammarPool(fSynchronizedGrammarPool)
                                : fSynchronizedGrammarPool;
View Full Code Here

        return new DOMParser(symbolTable, grammarPool);
    } // createDOMParser():DOMParser

    /** Creates a new SAX parser. */
    public SAXParser createSAXParser() {
        SymbolTable symbolTable = fShadowSymbolTable
                                ? new ShadowedSymbolTable(fSynchronizedSymbolTable)
                                : fSynchronizedSymbolTable;
        GrammarPool grammarPool = fShadowGrammarPool
                                ? new ShadowedGrammarPool(fSynchronizedGrammarPool)
                                : fSynchronizedGrammarPool;
View Full Code Here

            ENTITY_RESOLVER,
        };
        addRecognizedProperties(recognizedProperties);

        if (symbolTable == null) {
            symbolTable = new SymbolTable();
        }
        fSymbolTable = symbolTable;
        setProperty(SYMBOL_TABLE, fSymbolTable);

    } // <init>(SymbolTable)
View Full Code Here

    // Constructors
    //

    /** Default constructor. */
    public XMLGrammarPreparser() {
        this(new SymbolTable());
    } // <init>()
View Full Code Here

        // now we have all our arguments.  We only
        // need to parse the DTD's/schemas, put them
        // in a grammar pool, possibly instantiate an
        // appropriate configuration, and we're on our way.

        SymbolTable sym = new SymbolTable(BIG_PRIME);
        XMLGrammarPreparser preparser = new XMLGrammarPreparser(sym);
        XMLGrammarPoolImpl grammarPool = new XMLGrammarPoolImpl();
        boolean isDTD = false;
        if(externalDTDs != null) {
            preparser.registerPreparser(XMLGrammarDescription.XML_DTD, null);
View Full Code Here

TOP

Related Classes of org.apache.xerces.util.SymbolTable

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.