Examples of XPathFilterCHGPContainer


Examples of org.apache.xml.security.transforms.params.XPathFilterCHGPContainer

            "/XFDL/page/triggeritem[not(attribute::sid) | \n"  +
            "                       /XFDL/page/*/triggeritem]\n" +
            " | \n" +
            "here()/ancestor::ds:Signature[1]";
            //J+
         XPathFilterCHGPContainer xpathContainer =
            XPathFilterCHGPContainer
               .getInstance(doc, XPathFilterCHGPContainer
                  .IncludeSlash, includeButSearch, excludeButSearch, exclude);

         xpathContainer.setXPathNamespaceContext("ds",
                                                 Constants.SignatureSpecNS);
         transforms.addTransform(Transforms.TRANSFORM_XPATHFILTERCHGP,
                                 xpathContainer.getElement());
      }

      sig.addDocument("", transforms);

      String secretKey = "secret";
View Full Code Here

Examples of org.apache.xml.security.transforms.params.XPathFilterCHGPContainer

      {
         String includeButSearch = "//ToBeSigned";
         String excludeButSearch = null;
         String exclude = "here()/ancestor::ds:Signature[1]";
         XPathFilterCHGPContainer xpathContainer =
            XPathFilterCHGPContainer
               .getInstance(doc, XPathFilterCHGPContainer
                  .ExcludeSlash, includeButSearch, excludeButSearch, exclude);

         xpathContainer.setXPathNamespaceContext("ds",
                                                 Constants.SignatureSpecNS);
         transforms.addTransform(Transforms.TRANSFORM_XPATHFILTERCHGP,
                                 xpathContainer.getElement());
      }

      sig.addDocument("", transforms);

      String secretKey = "secret";
View Full Code Here

Examples of org.apache.xml.security.transforms.params.XPathFilterCHGPContainer

      {
         String includeButSearch = "//ToBeSigned";
         String excludeButSearch = "//NotToBeSigned";
         String exclude = "here()/ancestor::ds:Signature[1]";
         XPathFilterCHGPContainer xpathContainer =
            XPathFilterCHGPContainer
               .getInstance(doc, XPathFilterCHGPContainer
                  .ExcludeSlash, includeButSearch, excludeButSearch, exclude);

         xpathContainer.setXPathNamespaceContext("ds",
                                                 Constants.SignatureSpecNS);
         transforms.addTransform(Transforms.TRANSFORM_XPATHFILTERCHGP,
                                 xpathContainer.getElement());
      }

      sig.addDocument("", transforms);

      String secretKey = "secret";
View Full Code Here

Examples of org.apache.xml.security.transforms.params.XPathFilterCHGPContainer

      {
         String includeButSearch = "//ToBeSigned | //ReallyToBeSigned";
         String excludeButSearch = "//NotToBeSigned";
         String exclude = "here()/ancestor::ds:Signature[1]";
         XPathFilterCHGPContainer xpathContainer =
            XPathFilterCHGPContainer
               .getInstance(doc, XPathFilterCHGPContainer
                  .ExcludeSlash, includeButSearch, excludeButSearch, exclude);

         xpathContainer.setXPathNamespaceContext("ds",
                                                 Constants.SignatureSpecNS);
         transforms.addTransform(Transforms.TRANSFORM_XPATHFILTERCHGP,
                                 xpathContainer.getElement());
      }

      sig.addDocument("", transforms);

      String secretKey = "secret";
View Full Code Here

Examples of org.apache.xml.security.transforms.params.XPathFilterCHGPContainer

      doc.getDocumentElement().appendChild(sig.getElement());

      Transforms transforms = new Transforms(doc);

      {
         XPathFilterCHGPContainer xpathContainer =
            XPathFilterCHGPContainer.getInstance(doc, includeSlashPolicy,
                                                 includeButSearchStr,
                                                 excludeButSearchStr,
                                                 excludeStr);

         xpathContainer.setXPathNamespaceContext("ds",
                                                 Constants.SignatureSpecNS);
         xpathContainer.setXPathNamespaceContext("x", "http://foo.bar/");
         transforms.addTransform(Transforms.TRANSFORM_XPATHFILTERCHGP,
                                 xpathContainer.getElement());
      }

      sig.addDocument("", transforms);

      String secretKey = "secret";
View Full Code Here

Examples of org.apache.xml.security.transforms.params.XPathFilterCHGPContainer

                                "Transform" };

            throw new TransformationException("xml.WrongContent", exArgs);
         }

         XPathFilterCHGPContainer xpathContainer =
            XPathFilterCHGPContainer.getInstance(xpathElement,
                                                 input.getSourceURI());

         // get the document (root node) for the traversal
         Document inputDoc = null;

         {
            Iterator it = this.inputSet.iterator();

            if (it.hasNext()) {
               inputDoc = XMLUtils.getOwnerDocument((Node) it.next());
            }
         }

         {

            // 'tag' the include-but-search nodes
            Node includeButSearchCtxNode =
               xpathContainer.getHereContextNodeIncludeButSearch();
            NodeList includeButSearchNodes = null;

            if (includeButSearchCtxNode != null) {
               includeButSearchNodes = xPathFuncHereAPI.selectNodeList(doc,
                       includeButSearchCtxNode, xpathContainer.getElement());
            }

            this.includeSearchSet = nodeListToSet(includeButSearchNodes);
         }

         {

            // 'tag' the exclude-but-search nodes
            Node excludeButSearchCtxNode =
               xpathContainer.getHereContextNodeExcludeButSearch();
            NodeList excludeButSearchNodes = null;

            if (excludeButSearchCtxNode != null) {
               excludeButSearchNodes = xPathFuncHereAPI.selectNodeList(doc,
                       excludeButSearchCtxNode, xpathContainer.getElement());
            }

            this.excludeSearchSet = nodeListToSet(excludeButSearchNodes);
         }

         {

            // 'tag' the exclude nodes
            Node excludeCtxNode = xpathContainer.getHereContextNodeExclude();
            NodeList excludeNodes = null;

            if (excludeCtxNode != null) {
               excludeNodes = xPathFuncHereAPI.selectNodeList(doc,
                       excludeCtxNode, xpathContainer.getElement());
            }

            this.excludeSet = nodeListToSet(excludeNodes);
         }

         if (xpathContainer.getIncludeSlashPolicy()
                 == XPathFilterCHGPContainer.IncludeSlash) {
            this.includeSearchSet.add(inputDoc);
         } else {
            this.excludeSearchSet.add(inputDoc);
         }
View Full Code Here

Examples of org.apache.xml.security.transforms.params.XPathFilterCHGPContainer

                                "Transform" };

            throw new TransformationException("xml.WrongContent", exArgs);
         }

         XPathFilterCHGPContainer xpathContainer =
            XPathFilterCHGPContainer.getInstance(xpathElement,
                                                 input.getSourceURI());

         // get the document (root node) for the traversal
         Document inputDoc = null;

         {
            Iterator it = this.inputSet.iterator();

            if (it.hasNext()) {
               inputDoc = XMLUtils.getOwnerDocument((Node) it.next());
            }
         }

         {

            // 'tag' the include-but-search nodes
            Node includeButSearchCtxNode =
               xpathContainer.getHereContextNodeIncludeButSearch();
            NodeList includeButSearchNodes = null;

            if (includeButSearchCtxNode != null) {
               includeButSearchNodes = xPathFuncHereAPI.selectNodeList(doc,
                       includeButSearchCtxNode, xpathContainer.getElement());
            }

            this.includeSearchSet = nodeListToSet(includeButSearchNodes);
         }

         {

            // 'tag' the exclude-but-search nodes
            Node excludeButSearchCtxNode =
               xpathContainer.getHereContextNodeExcludeButSearch();
            NodeList excludeButSearchNodes = null;

            if (excludeButSearchCtxNode != null) {
               excludeButSearchNodes = xPathFuncHereAPI.selectNodeList(doc,
                       excludeButSearchCtxNode, xpathContainer.getElement());
            }

            this.excludeSearchSet = nodeListToSet(excludeButSearchNodes);
         }

         {

            // 'tag' the exclude nodes
            Node excludeCtxNode = xpathContainer.getHereContextNodeExclude();
            NodeList excludeNodes = null;

            if (excludeCtxNode != null) {
               excludeNodes = xPathFuncHereAPI.selectNodeList(doc,
                       excludeCtxNode, xpathContainer.getElement());
            }

            this.excludeSet = nodeListToSet(excludeNodes);
         }

         if (xpathContainer.getIncludeSlashPolicy()
                 == XPathFilterCHGPContainer.IncludeSlash) {
            this.includeSearchSet.add(inputDoc);
         } else {
            this.excludeSearchSet.add(inputDoc);
         }
View Full Code Here

Examples of org.apache.xml.security.transforms.params.XPathFilterCHGPContainer

      // String excludeStr = "//C | //D | //ds:Signature";
      String excludeStr =
         "//C | //D | here()/ancestor::ds:Signature[1] | //@x:attr";
      boolean includeSlashPolicy = XPathFilterCHGPContainer.ExcludeSlash;
      XPathFilterCHGPContainer xpathContainer =
         XPathFilterCHGPContainer.getInstance(doc, includeSlashPolicy,
                                              includeButSearchStr,
                                              excludeButSearchStr, excludeStr);

      xpathContainer.setXPathNamespaceContext("ds", Constants.SignatureSpecNS);
      xpathContainer.setXPathNamespaceContext("x", "http://foo.bar/");
      transforms.addTransform(Transforms.TRANSFORM_XPATHFILTERCHGP,
                              xpathContainer.getElement());
      sig.addDocument("", transforms);

      String secretKey = "secret";

      sig.getKeyInfo().addKeyName("The UTF-8 octets of \"" + secretKey
View Full Code Here

Examples of org.apache.xml.security.transforms.params.XPathFilterCHGPContainer

            "/XFDL/page/triggeritem[not(attribute::sid) | \n"  +
            "                       /XFDL/page/*/triggeritem]\n" +
            " | \n" +
            "here()/ancestor::ds:Signature[1]";
            //J+
         XPathFilterCHGPContainer xpathContainer =
            XPathFilterCHGPContainer
               .getInstance(doc, XPathFilterCHGPContainer
                  .IncludeSlash, includeButSearch, excludeButSearch, exclude);

         xpathContainer.setXPathNamespaceContext("ds",
                                                 Constants.SignatureSpecNS);
         transforms.addTransform(Transforms.TRANSFORM_XPATHFILTERCHGP,
                                 xpathContainer.getElement());
      }

      sig.addDocument("", transforms);

      String secretKey = "secret";
View Full Code Here

Examples of org.apache.xml.security.transforms.params.XPathFilterCHGPContainer

      {
         String includeButSearch = "//ToBeSigned";
         String excludeButSearch = null;
         String exclude = "here()/ancestor::ds:Signature[1]";
         XPathFilterCHGPContainer xpathContainer =
            XPathFilterCHGPContainer
               .getInstance(doc, XPathFilterCHGPContainer
                  .ExcludeSlash, includeButSearch, excludeButSearch, exclude);

         xpathContainer.setXPathNamespaceContext("ds",
                                                 Constants.SignatureSpecNS);
         transforms.addTransform(Transforms.TRANSFORM_XPATHFILTERCHGP,
                                 xpathContainer.getElement());
      }

      sig.addDocument("", transforms);

      String secretKey = "secret";
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.