Examples of insertBefore()


Examples of org.odftoolkit.odfdom.dom.element.office.OfficeTextElement.insertBefore()

        pEle = getContentRoot().newTextPElement();
      } else {
        OfficeTextElement contentRoot = getContentRoot();
        pEle = contentRoot.newTextPElement();
        OdfElement refEle = refParagraph.getOdfElement();
        contentRoot.insertBefore(pEle, refEle.getNextSibling());
      }
      pEle.setStyleName(style.getStyleNameAttribute());
    } catch (Exception e) {
      Logger.getLogger(TextDocument.class.getName()).log(Level.SEVERE, null, e);
      throw new RuntimeException(breakAttribute + "Break appends failed.", e);
View Full Code Here

Examples of org.odftoolkit.odfdom.dom.element.table.TableTableElement.insertBefore()

      Node refElement = maRowElement;
      Node oldRowElement = maRowElement;
      for (int i = repeateNum - 1; i >= 0; i--) {
        TableTableRowElement newRow = (TableTableRowElement) maRowElement.cloneNode(true);
        newRow.removeAttributeNS(OdfDocumentNamespace.TABLE.getUri(), "number-rows-repeated");
        tableEle.insertBefore(newRow, refElement);
        refElement = newRow;
        if (repeatedRowIndex == i) {
          ownerRowElement = newRow;
        } else {
          table.updateRowRepository(maRowElement, i, newRow, 0);
View Full Code Here

Examples of org.odftoolkit.odfdom.dom.element.table.TableTableRowElement.insertBefore()

          newBeforeCellElement.setTableNumberColumnsRepeatedAttribute(mnRepeatedColIndex);
        } else {
          newBeforeCellElement.removeAttributeNS(tableNamespaceURI, "number-columns-repeated");
        }
        // insert new before repeated cell
        ownerRowElement.insertBefore(newBeforeCellElement, currentCellElement);
        // update cell cache
        if (oldList != null) {
          Vector<Cell> newBeforeList = new Vector<Cell>(mnRepeatedColIndex);
          for (int i = 0; i < mnRepeatedColIndex && i < oldList.size(); i++) {
            Cell beforeCell = oldList.get(i);
View Full Code Here

Examples of org.odftoolkit.odfdom.pkg.OdfElement.insertBefore()

    TableContentValidationsElement validations = OdfElement.findFirstChildNode(
        TableContentValidationsElement.class, contentRootElement);
    if (validations == null) {
      validations = (TableContentValidationsElement) OdfXMLFactory.newOdfElement(ownerDocument
          .getContentDom(), OdfName.newName(OdfDocumentNamespace.TABLE, "content-validations"));
      contentRootElement.insertBefore(validations, contentRootElement.getFirstChild());
    }
    String validationName = getOdfElement().getTableContentValidationNameAttribute();
    TableContentValidationElement validationElement = null;
    if (validationName != null) {
      Node child = validations.getFirstChild();
View Full Code Here

Examples of org.thymeleaf.dom.Document.insertBefore()

        allownext = true;
        continue;
      }
      if (externalnode instanceof Comment || allownext) {
        if (beforehtml) {
          contentdocument.insertBefore(content, externalnode);
        }
        else {
          contentdocument.insertAfter(lastnode, externalnode);
          lastnode = externalnode;
        }
View Full Code Here

Examples of org.thymeleaf.dom.NestableNode.insertBefore()

        } else {
            inputElement.removeAttribute("checked");
        }
        inputElement.setAllNodeLocalVariables(localVariables);

        parent.insertBefore(element, inputElement);


        if (!isDisabled(inputElement)) {

            final String hiddenName = WebDataBinder.DEFAULT_FIELD_MARKER_PREFIX + name;
View Full Code Here

Examples of org.w3c.dom.Document.insertBefore()

    // Create and add the xml-stylesheet instruction
    final ProcessingInstruction pi
      = doc.createProcessingInstruction("xml-stylesheet",
                                        "type='text/xsl' href='mvn_dep_mgmt.xsl'");
    doc.insertBefore(pi, root);

    root.setAttribute("version", version);
    root.appendChild(doc.createTextNode("\n"));

    final Element dm = doc.createElement("dependencyManagement");
View Full Code Here

Examples of org.w3c.dom.Document.insertBefore()

          DocumentType docTypeNode = document.getImplementation()
              .createDocumentType(doctype_qname, doctype_pubid, doctype_sysid);
          if(document.getDoctype() != null){
            document.removeChild(document.getDoctype());
          }
          document.insertBefore(docTypeNode, document.getFirstChild());
        }
      }

      injectBaseTag(gadget, head);
      injectGadgetBeacon(gadget, head, firstHeadChild);
View Full Code Here

Examples of org.w3c.dom.DocumentFragment.insertBefore()

        while( cnt > 0 )
        {
            Node sibling = n.getPreviousSibling();
            Node xferNode = traverseFullySelected( n, how );
            if ( frag!=null )
                frag.insertBefore( xferNode, frag.getFirstChild() );
            --cnt;
            n = sibling;
        }
        // Collapse to just before the endAncestor, which
        // is partially selected.
View Full Code Here

Examples of org.w3c.dom.Element.insertBefore()

        DocumentBuilder builder = XMLUtils.createDocumentBuilder(false);
        Document document = builder.parse(file);

        XMLSignature sig = new XMLSignature(document, "", "http://www.w3.org/2000/09/xmldsig#rsa-sha1");
        Element root = document.getDocumentElement();
        root.insertBefore(sig.getElement(), root.getFirstChild());

        Transforms transforms = new Transforms(document);
        transforms.addTransform(Transforms.TRANSFORM_ENVELOPED_SIGNATURE);
        transforms.addTransform(Transforms.TRANSFORM_C14N_OMIT_COMMENTS);
        sig.addDocument("", transforms, "http://www.w3.org/2000/09/xmldsig#sha1");
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.