Package org.apache.xerces.utils

Examples of org.apache.xerces.utils.StringPool$CharArrayRange


    /**
     * Constructor
     */
    protected XMLParser() {
        this(new StringPool());
    }
View Full Code Here


        // fluff data
        DeferredDocumentImpl ownerDocument =
      (DeferredDocumentImpl) ownerDocument();
        int attrQName = ownerDocument.getNodeName(fNodeIndex);
        StringPool pool = ownerDocument.getStringPool();
        name = pool.toString(attrQName);

        // extract prefix and local part from QName
        int index = name.indexOf(':');
        String prefix;
        if (index < 0) {
            prefix = null;
            localName = name;
        }
        else {
            prefix = name.substring(0, index);
            localName = name.substring(index + 1);
        }

        isSpecified(ownerDocument.getNodeValue(fNodeIndex) == 1);
  //namespaceURI = pool.toString(ownerDocument.getNodeURI(attrQName));
        namespaceURI = pool.toString(ownerDocument.getNodeURI(fNodeIndex));
  // DOM Level 2 wants all namespace declaration attributes
  // to be bound to "http://www.w3.org/2000/xmlns/"
  // So as long as the XML parser doesn't do it, it needs to
  // done here.
  if (namespaceURI == null) {
View Full Code Here

    /**
     * Reset or copy parser
     * Allows parser instance reuse
     */
    protected void resetOrCopy() throws Exception {
        fStringPool = new StringPool();
        fEntityHandler.reset(fStringPool);
        fScanner.reset(fStringPool, new ChunkyCharArray(fStringPool));
        fValidator.resetOrCopy(fStringPool);
        fNeedReset = false;
        fGrammarResolver = new GrammarResolverImpl();
View Full Code Here

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

    /** Resets the parser. */
    public void reset() throws Exception {
        if (fStringPoolInUse) {
            // we can't reuse the string pool, let's create another one
            fStringPool = new StringPool();
            fStringPoolInUse = false;
        }
        super.reset();
        init();
    }
View Full Code Here

        try {
            Element root   = document.getDocumentElement();// This is what we pass to TraverserSchema
            //serial.serialize( root );
            //System.out.println(outWriter.toString());

            tst = new TraverseSchema( root, new StringPool(), new SchemaGrammar(), (GrammarResolver) new GrammarResolverImpl() );
            }
            catch (Exception e) {
                e.printStackTrace(System.err);
            }
           
View Full Code Here

    /**
     * Constructor
     */
    protected XMLParser() {
        fStringPool = new StringPool();
        fErrorReporter = this;
        fEntityHandler = new DefaultEntityHandler(fStringPool, fErrorReporter);
        fScanner = new XMLDocumentScanner(fStringPool, fErrorReporter, fEntityHandler, new ChunkyCharArray(fStringPool));
        fValidator = new XMLValidator(fStringPool, fErrorReporter, fEntityHandler, fScanner);
        fGrammarResolver = new GrammarResolverImpl();
View Full Code Here

    /**
     * Reset or copy parser
     * Allows parser instance reuse
     */
    protected void resetOrCopy() throws Exception {
        fStringPool = new StringPool();
        fEntityHandler.reset(fStringPool);
        fScanner.reset(fStringPool, new ChunkyCharArray(fStringPool));
        fValidator.resetOrCopy(fStringPool);
        fNeedReset = false;
        fGrammarResolver = new GrammarResolverImpl();
View Full Code Here

        try {
            Element root   = document.getDocumentElement();// This is what we pass to TraverserSchema
            //serial.serialize( root );
            //System.out.println(outWriter.toString());

            tst = new TraverseSchema( root, new StringPool(), new SchemaGrammar(), (GrammarResolver) new GrammarResolverImpl() );
            }
            catch (Exception e) {
                e.printStackTrace(System.err);
            }
           
View Full Code Here

        try {
            Element root   = document.getDocumentElement();// This is what we pass to TraverserSchema
            //serial.serialize( root );
            //System.out.println(outWriter.toString());

            tst = new TraverseSchema( root, new StringPool(), new SchemaGrammar(), (GrammarResolver) new GrammarResolverImpl() );
            }
            catch (Exception e) {
                e.printStackTrace(System.err);
            }
           
View Full Code Here

TOP

Related Classes of org.apache.xerces.utils.StringPool$CharArrayRange

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.