Package org.xml.sax.helpers

Examples of org.xml.sax.helpers.LocatorImpl


        public void characters(char[] ch, int start, int length)
            throws SAXException {
            if (charBuf == null) {
                charBuf = new StringBuffer();
                if (locator != null) {
                    charLocation = new LocatorImpl(locator);
                } else {
                    charLocation = NULL_LOCATOR;
                }
            }
            charBuf.append(ch, start, length);
View Full Code Here


    }
    parent = pParent;
    XSContext context = getContext();
    if (context != null) {
      Locator loc = context.getLocator();
      locator = loc == null ? null : new LocatorImpl(getContext().getLocator());
    } else {
      locator = null;
    }
  }
View Full Code Here

    initLocator();
  }

  public ValidationEventLocatorImpl(Locator locator)
  {
    _locator = new LocatorImpl(locator);
  }
View Full Code Here

  }

  public ValidationEventLocatorImpl(SAXParseException e)
  {
    _exception = e;
    _locator = new LocatorImpl();
    _locator.setColumnNumber(e.getColumnNumber());
    _locator.setLineNumber(e.getLineNumber());
  }
View Full Code Here

    _locator.setLineNumber(e.getLineNumber());
  }

  private void initLocator()
  {
    _locator = new LocatorImpl();
    _locator.setColumnNumber(-1);
    _locator.setLineNumber(-1);
  }
View Full Code Here

                new DynamicProcessMock("dynamicProcessMock", expectations);

        contextMock = new XMLPipelineContextMock("contextMock",
                expectations);

        locator = new LocatorImpl();

        dynamicProcessMock.expects.getPipelineContext()
                .returns(contextMock).any();

        contextMock.expects.getCurrentLocator().returns(locator).any();
View Full Code Here

       
        public void startElement(String namespaceURI, String localName,
          String qualifiedName, Attributes atts) throws SAXException {   
   
            this.getErrorHandler().warning(
              new SAXParseException("Warning", new LocatorImpl())
            );
            super.startElement(namespaceURI, localName, qualifiedName,
              atts);
           
        }       
View Full Code Here

    public void testSetDocumentLocator() throws Exception {
        // create an instance of the class that is to be tested
        XMLProcess process = createTestableProcess();
       
        // create a locator
        LocatorImpl locator = new LocatorImpl();
       
        // create a "base" URI
        URL baseURI = null;
        try {
            baseURI = new URL("http://foo.com");
        } catch (MalformedURLException e) {
            fail("Could not construct a java.net.URL instance");
        }
       
        // update the locator with the location
        locator.setSystemId(baseURI.toExternalForm());
       
        // set the next process
        XMLProcessTestable next = new XMLProcessTestable();
        process.setNextProcess(next);
       
View Full Code Here

    public void testEndDocument() throws Exception {
        // create an instance of the class that is to be tested
        XMLProcess process = createTestableProcess();
       
        // create a locator
        LocatorImpl locator = new LocatorImpl();
       
        // create a "base" URI
        URL baseURI = null;
        try {
            baseURI = new URL("http://foo.com");
        } catch (MalformedURLException e) {
            fail("Could not construct a java.net.URL instance");
        }
       
        // update the locator with the location
        locator.setSystemId(baseURI.toExternalForm());
       
        // set the next process
        XMLProcessTestable next = new XMLProcessTestable();
        process.setNextProcess(next);
               
View Full Code Here

    /**
     * Factory method for creating locator objects
     * @return a Locator instance
     */
    protected Locator createLocator() {
        return new LocatorImpl();
    }
View Full Code Here

TOP

Related Classes of org.xml.sax.helpers.LocatorImpl

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.