Examples of XPathException


Examples of client.net.sf.saxon.ce.trans.XPathException

                    uri = env.getURIForPrefix(parts[0]);
                } catch (XPathException e) {
                    uri = null;
                }
                if (uri == null) {
                    XPathException e = new XPathException("Prefix '" + parts[0] + "' has not been declared");
                    e.setErrorCode("FONS0004");
                    throw e;
                }
            }
            return new QNameValue(parts[0], uri, parts[1], BuiltInAtomicType.QNAME, true);

        } catch (XPathException err) {
            if (err.getErrorCodeQName() == null) {
                err.setErrorCode("FONS0004");
            }
            throw err;
        } catch (QNameException err) {
            XPathException e = new XPathException(err);
            e.setErrorCode("FORG0001");
            throw e;
        }
    }
View Full Code Here

Examples of com.caucho.xpath.XPathException

      form.applyLocalizedPattern(format);
      */
   
      return form.format(number);
    } catch (Exception e) {
      throw new XPathException(e);
    }
  }
View Full Code Here

Examples of com.ibm.commons.xml.xpath.XPathException

        try {
            PrefixResolver pr = nsContext!=null ? new NSResolver(nsContext) : null;
            XObject res = XPathAPI.eval(node,(String)xpath,pr);
            return convertResult(res);
        } catch(Exception e) {
            throw new XPathException(e,"Error while evaluating XPath {0}",xpath.toString()); // $NLS-AbstractXercesDriver.ErrorwhileevaluatingXPath0-1$
        }
    }
View Full Code Here

Examples of com.sun.org.apache.xerces.internal.impl.xpath.XPathException

                for(int j=0; j<fLocationPaths[i].steps.length; j++) {
                    com.sun.org.apache.xerces.internal.impl.xpath.XPath.Axis axis =
                        fLocationPaths[i].steps[j].axis;
                    if (axis.type == XPath.Axis.ATTRIBUTE &&
                            (j < fLocationPaths[i].steps.length-1)) {
                        throw new XPathException("c-fields-xpaths");
                    }
                }
            }
        } // <init>(String,SymbolTable,NamespacesContext)
View Full Code Here

Examples of com.sun.org.apache.xpath.internal.XPathException

    //                                      m_support.ERROR,
    //                                      null,
    //                                      null, fmsg, 0, 0);
    // if(shouldThrow)
    {
      throw new XPathException(fmsg, this);
    }
  }
View Full Code Here

Examples of com.volantis.mcs.xml.xpath.XPathException

        XPath policyXPath = new XPath(xpathString.toString(), new Namespace [] {
            MCSNamespace.DEVICE_DEFINITIONS });
        Element policy = policyXPath.selectSingleElement(invalidElement);

        if (policy == null) {
            throw new XPathException("Selected element was null for xPath: " +
                    invalidElement.toString());
        }

        String policyName =
                policy.getAttributeValue(DeviceRepositorySchemaConstants.
View Full Code Here

Examples of mf.org.apache.xerces.impl.xpath.XPathException

                for(int j=0; j<fLocationPaths[i].steps.length; j++) {
                    mf.org.apache.xerces.impl.xpath.XPath.Axis axis =
                        fLocationPaths[i].steps[j].axis;
                    if (axis.type == XPath.Axis.ATTRIBUTE &&
                            (j < fLocationPaths[i].steps.length-1)) {
                        throw new XPathException("c-fields-xpaths");
                    }
                }
            }
        } // <init>(String,SymbolTable,NamespacesContext)
View Full Code Here

Examples of name.pehl.totoe.xml.client.XPathException

            }
            return result;
        }
        catch (JavaScriptException e)
        {
            throw new XPathException(e.getMessage(), e);
        }
    }
View Full Code Here

Examples of net.sf.saxon.trans.XPathException

    }

    public Expression typeCheck(ExpressionVisitor visitor, ItemType contextItemType) throws XPathException {
        for (int i=0; i<conditions.length; i++) {
            conditions[i] = visitor.typeCheck(conditions[i], contextItemType);
            XPathException err = TypeChecker.ebvError(conditions[i], visitor.getConfiguration().getTypeHierarchy());
            if (err != null) {
                err.setLocator(conditions[i]);
                throw err;
            }
        }
        for (int i=0; i<actions.length; i++) {
            try {
                actions[i] = visitor.typeCheck(actions[i], contextItemType);
            } catch (XPathException err) {
                // mustn't throw the error unless the branch is actually selected, unless its a type error
                if (err.isTypeError()) {
                    throw err;
                } else {
                    actions[i] = new ErrorExpression(err);
                }
            }
View Full Code Here

Examples of net.sf.saxon.xpath.XPathException

        String module = env.getSystemId();
        lineInfo += (module == null ? "" : "of " + module + ' ');
        String prefix = getLanguage() + " syntax error " + lineInfo +
                (message.startsWith("...") ? "near" : "in") +
                " `" + s + "`:\n    ";
        XPathException exception = new StaticError(prefix + message);
        try {
            env.getConfiguration().getErrorListener().error(exception);
        } catch (TransformerException err) {
            if (err instanceof StaticError) {
                throw (StaticError) err;
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.