Examples of declareNamespace()


Examples of javax.xml.xquery.XQStaticContext.declareNamespace()

          if (!nsContext.getUriSet().contains(Namespaces.ODE_EXTENSION_NS)) {
            nsContext.register("ode", Namespaces.ODE_EXTENSION_NS);
          }
          for (String prefix : prefixes) {
            String uri = nsContext.getNamespaceURI(prefix);
            staticContext.declareNamespace(prefix, uri);
            if ("".equals(prefix)) {
              declarations.declareDefaultElementNamespace(uri);
            } else if ("bpws".equals(prefix)) {
                    declarations.declareNamespace("bpws", "java:" + Constants.XQUERY_FUNCTION_HANDLER_COMPILER);
            } else {
View Full Code Here

Examples of net.sf.saxon.query.StaticQueryContext.declareNamespace()

              } else {
                context.setDefaultElementNamespace(item.getUri());
                ic.setDefaultElementNamespace(item.getUri());
              }
            } else {
            context.declareNamespace(item.getPrefix(), item.getUri());
            ic.declareNamespace(item.getPrefix(), item.getUri());
            }
      }
        }
        for (DerivedColumn derivedColumn : passing) {
View Full Code Here

Examples of net.sf.saxon.s9api.XPathCompiler.declareNamespace()

                        String nsuri = inscopeNS.getURIForPrefix(nspfx, "".equals(nspfx));
                        lclnsBindings.put(nspfx, nsuri);
                    }

                    for (String prefix : lclnsBindings.keySet()) {
                        xcomp.declareNamespace(prefix, lclnsBindings.get(prefix));
                    }

                    XPathExecutable xexec = xcomp.compile(nsbinding.getXPath());
                    XPathSelector selector = xexec.load();
View Full Code Here

Examples of net.sf.saxon.sxpath.IndependentContext.declareNamespace()

                context.setDefaultElementNamespace(item.getUri());
                ic.setDefaultElementNamespace(item.getUri());
              }
            } else {
            context.declareNamespace(item.getPrefix(), item.getUri());
            ic.declareNamespace(item.getPrefix(), item.getUri());
            }
      }
        }
        for (DerivedColumn derivedColumn : passing) {
          if (derivedColumn.getAlias() == null) {
View Full Code Here

Examples of net.sf.saxon.sxpath.IndependentContext.declareNamespace()

                sc.setDefaultElementNamespace(defaultNS);

            for (int i = 0; i < namespaceMap.length; i++)
            {
                Map.Entry entry = (Map.Entry) namespaceMap[i];
                sc.declareNamespace((String) entry.getKey(),
                        (String) entry.getValue());
            }
            xpe.setStaticContext(sc);
            XPathVariable thisVar = xpe.declareVariable("", contextVar);
            XPathExpression xpath = xpe.createExpression(path);
View Full Code Here

Examples of org.apache.axiom.om.OMElement.declareNamespace()

                    throw new RuntimeException("Operation: " + operationName + " takes " + parameterTypes.length +
                        " argument(s), and 'arguments' only contains: " + arguments.length);
                }

                // - declare all the namespaces
                operationOMElement.declareNamespace(xsiNamespace);
                for (final OMNamespace namespace : namespaces.values())
                {
                    operationOMElement.declareNamespace(namespace);
                }
View Full Code Here

Examples of org.apache.axiom.om.OMElement.declareNamespace()

                // - declare all the namespaces
                operationOMElement.declareNamespace(xsiNamespace);
                for (final OMNamespace namespace : namespaces.values())
                {
                    operationOMElement.declareNamespace(namespace);
                }

                // - add the argument children
                for (int ctr = 0; ctr < argumentElements.size(); ctr++)
                {
View Full Code Here

Examples of org.apache.axiom.om.OMElement.declareNamespace()

            }
        }

        OMElement code = fac.createOMElement("code", synNS, fault);
        if (mediator.getFaultCodeValue() != null) {
            OMNamespace ns = code.declareNamespace(mediator.getFaultCodeValue().getNamespaceURI(),
                    mediator.getFaultCodeValue().getPrefix());
            code.addAttribute(fac.createOMAttribute(
                    "value", nullNS, ns.getPrefix() + ":"
                    + mediator.getFaultCodeValue().getLocalPart()));
View Full Code Here

Examples of org.apache.axiom.om.OMElement.declareNamespace()

                header.addAttribute(fac.createOMAttribute(
                    "name", nullNS,
                    (qName.getPrefix() != null && !"".equals(qName.getPrefix())
                        ? qName.getPrefix() + ":" : "") +
                    qName.getLocalPart()));
                header.declareNamespace(qName.getNamespaceURI(), qName.getPrefix());
            } else {
                header.addAttribute(fac.createOMAttribute(
                    "name", nullNS, qName.getLocalPart()));
            }
        }
View Full Code Here

Examples of org.apache.axiom.om.OMElement.declareNamespace()

        super(metaFactory);
    }

    protected void runTest() throws Throwable {
        OMElement element = metaFactory.getOMFactory().createOMElement(new QName("test"));
        OMNamespace ns = element.declareNamespace("urn:ns1", "ns1");
        assertEquals("urn:ns1", ns.getNamespaceURI());
        assertEquals("ns1", ns.getPrefix());
        Iterator it = element.getAllDeclaredNamespaces();
        assertTrue(it.hasNext());
        OMNamespace ns2 = (OMNamespace)it.next();
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.