Package client.net.sf.saxon.ce.om

Examples of client.net.sf.saxon.ce.om.StructuredQName


  public void setParameter(String namespaceURI, String localName, Object value) {

    String ns = (namespaceURI == null)? "" : namespaceURI;

    try {
      StructuredQName qn = new StructuredQName("", ns, localName);
      controller.setParameter(qn, getValue(value));
    } catch (Exception e) {
      Xslt20ProcessorImpl.handleException(e, "setParameter");
    }
  }
View Full Code Here


    public SourceLocator getSourceLocator() {
        return sourceLocator;
    }

    public void setErrorCode(String errorCode) {
        this.errorCode = new StructuredQName("err", NamespaceConstant.ERR, errorCode);
    }
View Full Code Here

     * @return a message that concatenates the message of this exception with its contained exceptions,
     *         also including information about the error code and location.
     */
    public static String getExpandedMessage(XPathException err) {

        StructuredQName qCode;
        String additionalLocationText;
        qCode = err.getErrorCodeQName();
        additionalLocationText = err.getAdditionalLocationText();
        if (qCode == null && err.getCause() instanceof XPathException) {
            qCode = ((XPathException)err.getCause()).getErrorCodeQName();
        }
        String message = "";
        String codeText = "";
        if (qCode != null) {
            if (qCode.getNamespaceURI().equals(NamespaceConstant.ERR)) {
                message = qCode.getLocalName();
            } else {
                message = qCode.getDisplayName();
            }
        }

        if (additionalLocationText != null) {
            message += " " + additionalLocationText;
View Full Code Here

   
    private static String prevModule = "";

    public void enter(/*@NotNull*/ InstructionInfo info, XPathContext context) {
        int infotype = info.getConstructType();
        StructuredQName qName = info.getObjectName();
        String tag = tag(infotype);
        if (tag==null) {
            // this TraceListener ignores some events to reduce the volume of output
            return;
        }
        String file = StandardErrorListener.abbreviatePath(info.getSystemId());
        String msg = AbstractTraceListener.spaces(indent) + '<' + tag;
        String name = (String)info.getProperty("name");
        if (name!=null) {
            msg += " name=\"" + escape(name) + '"';
        } else if (qName != null) {
            msg += " name=\"" + escape(qName.getDisplayName()) + '"';
        }

        Iterator props = info.getProperties();
       
        while (props.hasNext()) {
View Full Code Here

    * Evaluate the function at run-time
    */

    public Item evaluateItem(XPathContext context) throws XPathException {

        StructuredQName qName = propertyName;
        if (qName == null) {
            CharSequence name = argument[0].evaluateItem(context).getStringValueCS();
            try {
                qName = StructuredQName.fromLexicalQName(name,
                        false,
                        nsContext);
             } catch (XPathException err) {
                 dynamicError("Invalid system property name. " + err.getMessage(), "XTDE1390", context);
                 return null;
            }
        }
        return new StringValue(getProperty(
                qName.getNamespaceURI(), qName.getLocalName(), context.getConfiguration()));
    }
View Full Code Here

        if (requiredParams == null) {
            return;
        }
        Iterator<StructuredQName> iter = requiredParams.iterator();
        while (iter.hasNext()) {
            StructuredQName req = iter.next();
            if (params == null || !params.containsKey(req)) {
//           if (params == null || params.get(req) == null) {
                XPathException err = new XPathException("No value supplied for required parameter " +
                        req.getDisplayName());
                err.setErrorCode("XTDE0050");
                throw err;
            }
        }
    }
View Full Code Here

TOP

Related Classes of client.net.sf.saxon.ce.om.StructuredQName

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.