Examples of newXPath()


Examples of com.saxonica.SchemaAwareXPathFactory.newXPath()

        // Load an XPath factory. This should load the Saxon schema-aware factory if everything has
        // been configured correctly.

        //XPathFactory xpf = XPathFactory.newInstance(NamespaceConstant.OBJECT_MODEL_SAXON);
        XPathFactory xpf = new SchemaAwareXPathFactory();
        XPath xpe = xpf.newXPath();
        System.err.println("Loaded XPath Provider " + xpe.getClass().getName() +
                " using factory " + xpf.getClass().getName());

        // Check that we really have loaded a schema-aware XPath processor
View Full Code Here

Examples of com.saxonica.config.EnterpriseXPathFactory.newXPath()

        // Load an XPath factory. This should load the Saxon schema-aware factory if everything has
        // been configured correctly.

        //XPathFactory xpf = XPathFactory.newInstance(NamespaceConstant.OBJECT_MODEL_SAXON);
        XPathFactory xpf = new EnterpriseXPathFactory();
        XPath xpe = xpf.newXPath();
        System.err.println("Loaded XPath Provider " + xpe.getClass().getName() +
                " using factory " + xpf.getClass().getName());

        // Check that we really have loaded a schema-aware XPath processor
View Full Code Here

Examples of javax.xml.xpath.XPathFactory.newXPath()

  public void execute(WorkItem workItem, ProcessContext context) throws Exception {
        String from = assignment.getFrom();
        String to = assignment.getTo();
       
        XPathFactory factory = XPathFactory.newInstance();
        XPath xpathFrom = factory.newXPath();

        XPathExpression exprFrom = xpathFrom.compile(from);

        XPath xpathTo = factory.newXPath();
View Full Code Here

Examples of javax.xml.xpath.XPathFactory.newXPath()

        XPathFactory factory = XPathFactory.newInstance();
        XPath xpathFrom = factory.newXPath();

        XPathExpression exprFrom = xpathFrom.compile(from);

        XPath xpathTo = factory.newXPath();

        XPathExpression exprTo = xpathTo.compile(to);

        Object target = null;
        Object source = null;
View Full Code Here

Examples of javax.xml.xpath.XPathFactory.newXPath()

        return this.id;
    }

    public Object evaluate(final ProcessContext context) throws Exception {       
      XPathFactory factory = XPathFactory.newInstance();
      XPath xpathEvaluator = factory.newXPath();
      xpathEvaluator.setXPathFunctionResolver(
          new  XPathFunctionResolver() {
            public XPathFunction resolveFunction(QName functionName, int arity)
            {
              String localName = functionName.getLocalPart();
View Full Code Here

Examples of javax.xml.xpath.XPathFactory.newXPath()

        }
        Element root = document.getDocumentElement();
        root.appendChild(sig.getElement());

        XPathFactory xpf = XPathFactory.newInstance();
        XPath xpath = xpf.newXPath();
        xpath.setNamespaceContext(new DSNamespaceContext());

        for (String localName : localNames) {
            String expression = "//*[local-name()='" + localName + "']";
            NodeList elementsToSign =
View Full Code Here

Examples of javax.xml.xpath.XPathFactory.newXPath()

            builderKeyInfo.add(encryptedKey);
        }
       
        XPathFactory xpf = XPathFactory.newInstance();
        XPath xpath = xpf.newXPath();
        xpath.setNamespaceContext(new DSNamespaceContext());

        for (String localName : localNames) {
            String expression = "//*[local-name()='" + localName + "']";
            Element elementToEncrypt =
View Full Code Here

Examples of javax.xml.xpath.XPathFactory.newXPath()

            throw new SAXException("Only xpointer scheme is supported ATM");
        }
        xPointerSchemeIndex += xPointerSchemeString.length();
        int xPointerSchemeEndIndex = this.findBalancedEndIndex(xpointer, xPointerSchemeIndex, '(', ')');
        XPathFactory xPathFactory = XPathFactory.newInstance();
        XPath xPath = xPathFactory.newXPath();

        int xmlnsSchemeIndex = xpointer.indexOf(xmlnsSchemeString);
        if (xmlnsSchemeIndex >= 0) {
            xmlnsSchemeIndex += xmlnsSchemeString.length();
            int xmlnsSchemeEndIndex = this.findBalancedEndIndex(xpointer, xmlnsSchemeIndex, '(', ')');
View Full Code Here

Examples of javax.xml.xpath.XPathFactory.newXPath()

        }
        Document doc1 = getDocument(file1);
        Document doc2 = getDocument(file2);

        XPathFactory xpf = XPathFactory.newInstance();
        XPath xpath = xpf.newXPath();
        xpath.setNamespaceContext(new DSNamespaceContext());

        String expression = "//ds:Transform[1]";
        Element transformEl =
            (Element) xpath.evaluate(expression, doc1, XPathConstants.NODE);
View Full Code Here

Examples of javax.xml.xpath.XPathFactory.newXPath()

    private static String retrieveCCNumber(Document doc)
        throws javax.xml.transform.TransformerException,
        XPathExpressionException {
       
        XPathFactory xpf = XPathFactory.newInstance();
        XPath xpath = xpf.newXPath();
        Map<String, String> namespace = new HashMap<String, String>();
        namespace.put("x", "urn:example:po");
        DSNamespaceContext context = new DSNamespaceContext(namespace);
        xpath.setNamespaceContext(context);
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.