Examples of Locator


Examples of org.xml.sax.Locator

        }

        // 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

Examples of org.xml.sax.Locator

//    }
//    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

Examples of org.xml.sax.Locator

  }

  @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

Examples of org.zkoss.util.resource.Locator

    if (param != null)
      _compress = "true".equals(param);

    param = config.getInitParameter("class-resource");
    final boolean bClsRes = "true".equals(param);
    _locator = new Locator() {
      public String getDirectory() {
        return null; //FUTURE: support relative path
      }
      public URL getResource(String name) {
        URL url = null;
View Full Code Here

Examples of org.zkoss.zuss.Locator

  @Override
  public NanoHTTPD.Response serve(NanoHTTPD.IHTTPSession session, ResourceSystem resourceSystem) throws Exception {
    String uri = session.getUri();
    ResourceRef ref = resourceSystem.get(uri);

    Locator locator = createLocator(ref.parent());
    String initName = ref.name();

    //parse file into definition
    ZussDefinition definition = new Parser(locator.getResource(initName), locator, initName).parse();

    //translate into CSS
    StringWriter buffer = new StringWriter();
    new Translator(definition, buffer, dummyResolver).translate();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.