Package org.xml.sax

Examples of org.xml.sax.Locator


    final XsAnyURI schemaLocation = pInclude.getSchemaLocation();
    if (schemaLocation == null) {
      throw new LocSAXException("Invalid include: Missing 'schemaLocation' attribute.",
          pInclude.getLocator());
    }
    Locator locator = pInclude.getLocator();
    XsESchema includedSchema = parseSyntax(locator, schemaLocation.toString());
    XsAnyURI incNamespace = includedSchema.getTargetNamespace();
    if (incNamespace == null) {
      if (pIncludingSchema.getTargetNamespace() != null) {
        includedSchema.setTargetNamespace(pIncludingSchema.getTargetNamespace());
View Full Code Here


        public DTDAttribute(String pName, String pType, String pMode, String pValue) {
          name = pName;
            type = pType;
            mode = pMode;
            value = pValue;
            Locator l = DTDParser.this.getLocator();
            if (l == null) {
              loc = null;
            } else {
              loc = new LocatorImpl(l);
            }
View Full Code Here

          name = pName;
        }
        /** Sets the elements content model.
         */
        public void setModel(String pModel) {
            Locator l = DTDParser.this.getLocator();
          if (l == null) {
            loc = null;
            } else {
              loc = new LocatorImpl(l);
            }
View Full Code Here

   }

   /** Returns a locator implementation. */
   private LocatorImpl getLocatorImpl(LocatorImpl fillin) {

      Locator here = fErrorReporter.getLocator();
      if (fillin == null)
         return new LocatorImpl(here);
      fillin.setPublicId(here.getPublicId());
      fillin.setSystemId(here.getSystemId());
      fillin.setLineNumber(here.getLineNumber());
      fillin.setColumnNumber(here.getColumnNumber());
      return fillin;

   } // getLocatorImpl(LocatorImpl):LocatorImpl
View Full Code Here

        }

        // stylesheet.setDOMBackPointer(handler.getOriginatingNode());
        // ***** Note that we're assigning an empty locator. Is this necessary?
        SAXSourceLocator slocator = new SAXSourceLocator();
        Locator locator = handler.getLocator();
        if(null != locator)
        {
          slocator.setLineNumber(locator.getLineNumber());
          slocator.setColumnNumber(locator.getColumnNumber());
          slocator.setPublicId(locator.getPublicId());
          slocator.setSystemId(locator.getSystemId());
        }
        stylesheet.setLocaterInfo(slocator);
        stylesheet.setPrefixes(handler.getNamespaceSupport());
        handler.pushStylesheet(stylesheet);

View Full Code Here

//    }
//    TODO: </REVIEW>
               
                if (node instanceof Locator)
                {
                        Locator loc = (Locator)node;
                        m_locator.setColumnNumber(loc.getColumnNumber());
                        m_locator.setLineNumber(loc.getLineNumber());
                        m_locator.setPublicId(loc.getPublicId());
                        m_locator.setSystemId(loc.getSystemId());
                }
                else
                {
                        m_locator.setColumnNumber(0);
      m_locator.setLineNumber(0);
View Full Code Here

  }

  @Override
  protected Object getOrigin() {
    Interpreter i = (Interpreter) super.getOrigin();
    Locator locator = i.locator;
    if (locator != null) {
      return Interpreter.class.getName() + "@" + locator.getLineNumber() + ":"
          + locator.getColumnNumber();
    } else {
      return Interpreter.class.getName() + "@NA:NA";
    }
  }
View Full Code Here

      ((NodeConsumer) m_contentHandler).setOriginatingNode(node);
    }
               
                if (node instanceof Locator)
                {
                        Locator loc = (Locator)node;
                        m_locator.setColumnNumber(loc.getColumnNumber());
                        m_locator.setLineNumber(loc.getLineNumber());
                        m_locator.setPublicId(loc.getPublicId());
                        m_locator.setSystemId(loc.getSystemId());
                }
                else
                {
                        m_locator.setColumnNumber(0);
      m_locator.setLineNumber(0);
View Full Code Here

        }

        // stylesheet.setDOMBackPointer(handler.getOriginatingNode());
        // ***** Note that we're assigning an empty locator. Is this necessary?
        SAXSourceLocator slocator = new SAXSourceLocator();
        Locator locator = handler.getLocator();
        if(null != locator)
        {
          slocator.setLineNumber(locator.getLineNumber());
          slocator.setColumnNumber(locator.getColumnNumber());
          slocator.setPublicId(locator.getPublicId());
          slocator.setSystemId(locator.getSystemId());
        }
        stylesheet.setLocaterInfo(slocator);
        stylesheet.setPrefixes(handler.getNamespaceSupport());
        handler.pushStylesheet(stylesheet);

View Full Code Here

         InterruptedException, TimeoutException, IOException {

      ParseSax<String> parser = createParser();
      HttpRequest request = HttpRequest.builder().method("GET").endpoint("http://foohost").build();
      HttpResponse response = HttpResponse.builder().statusCode(304).message("Not Modified").build();;
      Locator locator = createMock(Locator.class);
      expect(locator.getColumnNumber()).andReturn(1);
      expect(locator.getLineNumber()).andReturn(1);
      expect(locator.getPublicId()).andReturn("publicId");
      expect(locator.getSystemId()).andReturn("systemId");
      replay(locator);
      Exception input = new SAXParseException("foo", locator);
      verify(locator);

      try {
View Full Code Here

TOP

Related Classes of org.xml.sax.Locator

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.