Examples of PrefixResolverDefault


Examples of org.apache.xml.utils.PrefixResolverDefault

            throw new InvalidWsrfWsdlException( "Value for xsd:element 'ref' attribute must be qualified via a namespace prefix." );
        }
        String propPrefix = tokenizer.nextToken();
        String propLocalName = tokenizer.nextToken();
        // TODO: write our own prefix resolver to eliminate dep on Xalan
        PrefixResolver prefixResolver = new PrefixResolverDefault( schemaElem );
        String propNamespace = prefixResolver.getNamespaceForPrefix( propPrefix );
        if ( propNamespace == null )
        {
           throw new InvalidWsrfWsdlException( "Unable to resolve prefix '" + propPrefix + "' in xsd:element 'ref' attribute value." );
        }
        QName propName = new QName( propNamespace, propLocalName, propPrefix );
View Full Code Here

Examples of org.apache.xml.utils.PrefixResolverDefault

             * in the query (Xalan will just throw an error if a prefix
             * is used).  In the future we may want to revisit this
             * to make it easier for users to query based on namespaces.
             */
            query = new XPath(queryExpr, null,
                new PrefixResolverDefault(dBuilder.newDocument()),
                XPath.SELECT);
           
            this.queryExpr = queryExpr;
            this.opName = opName;
            this.recompileQuery = false;
View Full Code Here

Examples of org.apache.xml.utils.PrefixResolverDefault

                           String expr_string )
   throws Exception
   {
      XPathContext   xpathSupport   = new XPathContext(  );
      PrefixResolver prefixResolver =
         new PrefixResolverDefault( ( props_doc_node.getNodeType(  ) == Node.DOCUMENT_NODE )
                                    ? ( (Document) props_doc_node ).getDocumentElement(  ) : props_doc_node );

      // Create the XPath object.
      XPath xpath = null;
View Full Code Here

Examples of org.apache.xml.utils.PrefixResolverDefault

                }

                XPathContext xpc = new XPathContext();
                PrefixResolver pfx;
                if (pr == null) {
                    pfx = new PrefixResolverDefault(d.getDocumentElement());
                    xp = new XPath(query, null, pfx, XPath.SELECT, errors);
                } else {
                    pfx = pr;
                    if (xp == null) {
                        xp = new XPath(query, null, pfx, XPath.SELECT, errors);
View Full Code Here

Examples of org.apache.xml.utils.PrefixResolverDefault

        if (namespace != null) {
            if (namespace.getNodeType() == Node.DOCUMENT_NODE) {
                namespace = ((Document) namespace).getDocumentElement();
            }

            prefixResolver = new PrefixResolverDefault(namespace);
        } else {
            prefixResolver = new PrefixResolverDefault(rootNode);
        }

        // Create the XPath object.
        xpath = new XPath(qstring, null, prefixResolver, XPath.SELECT, null);
View Full Code Here

Examples of org.apache.xml.utils.PrefixResolverDefault

            Expression ex;
      try {
                if (nsMap != null) {
                    Node n = nsMap.getContextNode();
                    pr = new PrefixResolverDefault(n);
                }

                cmp = createCompiler();
                XPathParser parser = new XPathParser(errorListener, null);
                parser.initXPath(cmp, query, pr);
View Full Code Here

Examples of org.apache.xml.utils.PrefixResolverDefault

    // Create an object to resolve namespace prefixes.
    // XPath namespaces are resolved from the input context node's document element
    // if it is a root node, or else the current context node (for lack of a better
    // resolution space, given the simplicity of this sample code).
    PrefixResolverDefault prefixResolver = new PrefixResolverDefault(
      (namespaceNode.getNodeType() == Node.DOCUMENT_NODE)
      ? ((Document) namespaceNode).getDocumentElement() : namespaceNode);

    // Create the XPath object.
    XPath xpath = new XPath(str, null, prefixResolver, XPath.SELECT, null);
View Full Code Here

Examples of org.apache.xml.utils.PrefixResolverDefault

    // Create an object to resolve namespace prefixes.
    // XPath namespaces are resolved from the input context node's document element
    // if it is a root node, or else the current context node (for lack of a better
    // resolution space, given the simplicity of this sample code).
    PrefixResolverDefault prefixResolver = new PrefixResolverDefault(
      (namespaceNode.getNodeType() == Node.DOCUMENT_NODE)
      ? ((Document) namespaceNode).getDocumentElement() : namespaceNode);

    // Create the XPath object.
    XPath xpath = new XPath(str, null, prefixResolver, XPath.SELECT, null);
View Full Code Here

Examples of org.apache.xml.utils.PrefixResolverDefault

    // Create an object to resolve namespace prefixes.
    // XPath namespaces are resolved from the input context node's document element
    // if it is a root node, or else the current context node (for lack of a better
    // resolution space, given the simplicity of this sample code).
    PrefixResolverDefault prefixResolver = new PrefixResolverDefault(
      (namespaceNode.getNodeType() == Node.DOCUMENT_NODE)
      ? ((Document) namespaceNode).getDocumentElement() : namespaceNode);

    // Create the XPath object.
    XPath xpath = new XPath(str, null, prefixResolver, XPath.SELECT, null);
View Full Code Here

Examples of org.apache.xml.utils.PrefixResolverDefault

             * in the query (Xalan will just throw an error if a prefix
             * is used).  In the future we may want to revisit this
             * to make it easier for users to query based on namespaces.
             */
            query = new XPath(queryExpr, null,
                new PrefixResolverDefault(dBuilder.newDocument()),
                XPath.SELECT);
           
            this.queryExpr = queryExpr;
            this.opName = opName;
            this.recompileQuery = false;
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.