Examples of DocumentFragment


Examples of org.w3c.dom.DocumentFragment

  {
    if (componentNode == null)
      throw new IllegalArgumentException("No node specified");
   
    // get the fragement, imported into the target document
    DocumentFragment targetFragment = getImportedComponentFragment(componentNode);
   
    Element facetElement = ChangeUtils.__getFacetElement(componentNode, _facetName);
   
    if (facetElement != null)
    {
View Full Code Here

Examples of org.w3c.dom.DocumentFragment

  {
    if (componentNode == null)
      throw new IllegalArgumentException("No node specified");
   
    // get the fragement, imported into the target document
    DocumentFragment targetFragment =
      getImportedComponentFragment(componentNode);
   
    // assume that we'll be appending
    Node insertBeforeNode = null;
   
View Full Code Here

Examples of org.w3c.dom.DocumentFragment

          gadget.getContext().getContainer(), gadget.getContext().getView());
      MessageELResolver messageELResolver = new MessageELResolver(expressions, bundle);

      int autoUpdateID = 0;
      for (Element template : templates) {
        DocumentFragment result = processor.get().processTemplate(
            template, templateContext, messageELResolver, registry);
        // TODO: sanitized renders should ignore this value
        if ("true".equals(template.getAttribute("autoUpdate"))) {
          // autoUpdate requires client-side processing.
          needsFeature = true;
View Full Code Here

Examples of org.w3c.dom.DocumentFragment

                         new NodeCreateRule(Node.DOCUMENT_FRAGMENT_NODE));
        Object result = digester.parse(new StringReader(TEST_XML));

        assertNotNull(result);
        assertTrue(result instanceof DocumentFragment);
        DocumentFragment fragment = (DocumentFragment)result;
        assertEquals(4, fragment.getChildNodes().getLength());

        Node rootBody = fragment.getFirstChild();
        assertEquals(Node.TEXT_NODE, rootBody.getNodeType());
        assertEquals("ROOT BODY", rootBody.getNodeValue());

        Node alpha = fragment.getChildNodes().item(1);
        assertEquals(Node.ELEMENT_NODE, alpha.getNodeType());
        assertEquals("alpha", alpha.getNodeName());
        assertNull(((Element)alpha).getLocalName());
        assertNull(((Element)alpha).getNamespaceURI());
        assertEquals(1, alpha.getChildNodes().getLength());
        assertEquals("ALPHA BODY", alpha.getFirstChild().getNodeValue());

        Node beta = fragment.getChildNodes().item(2);
        assertEquals(Node.ELEMENT_NODE, beta.getNodeType());
        assertEquals("beta", beta.getNodeName());
        assertNull(((Element)beta).getLocalName());
        assertNull(((Element)beta).getNamespaceURI());
        assertEquals(1, beta.getChildNodes().getLength());
        assertEquals("BETA BODY", beta.getFirstChild().getNodeValue());

        Node gamma = fragment.getChildNodes().item(3);
        assertEquals(Node.ELEMENT_NODE, gamma.getNodeType());
        assertEquals("gamma", gamma.getNodeName());
        assertNull(((Element)gamma).getLocalName());
        assertNull(((Element)gamma).getNamespaceURI());
        assertEquals(1, gamma.getChildNodes().getLength());
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.