Package client.net.sf.saxon.ce.tree.util

Examples of client.net.sf.saxon.ce.tree.util.SourceLocator


                useWhen = startTag.getAttribute(xslUseWhenCode);
            }
            if (useWhen != null) {
                Expression expr = null;
                try {
                    SourceLocator loc = new SourceLocator() {
                        public String getSystemId() {
                            return UseWhenFilter.this.getSystemId();
                        }

                        public String getLocation() {
View Full Code Here


   
    private SourceLocator getLastLocator() {
      int stackSize = stack.size();
      Expression[] expr = new Expression[stackSize];
      stack.toArray(expr);
      SourceLocator result = null;
      for (int i = stackSize -1; i > -1; i--) {
        if (expr[i].sourceLocator != null) {
          return expr[i].sourceLocator;
        }
      }
View Full Code Here

      }
      return result;
    }
   
    public String getLocation() {
      SourceLocator sl = getLastLocator();
      String message = "";
      if (sl != null) {
        message = sl.getLocation();
        int pos = message.indexOf(" in ");
        if (pos > -1) {
          message = message.substring(0, pos);
        }
      }
View Full Code Here

     * @param err the exception containing the location information
     * @return a message string describing the location
     */

    public String getLocationMessage(XPathException err) {
        SourceLocator loc = err.getLocator();
        while (loc == null) {
            if (err.getCause() instanceof XPathException) {
                err = (XPathException)err.getCause();
                loc = err.getLocator();
            } else if (err.getCause() instanceof XPathException) {
View Full Code Here

        result = new ContextMappingIterator(this, context2);

        // Peek at the first item, and depending on its type, check that all the items
        // are atomic values or that all are nodes.
        final SourceLocator loc = getSourceLocator();
        Item first = result.next();
        if (first == null) {
            return EmptyIterator.getInstance();
        } else if (first instanceof AtomicValue) {
            ItemMappingFunction atomicValueChecker = new ItemMappingFunction() {
View Full Code Here

TOP

Related Classes of client.net.sf.saxon.ce.tree.util.SourceLocator

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.