Examples of createAttribute()


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

          Attr attr;
          if (qualify && !(ns.equals(ctx.getDefaultNS()) || ctx.getDefaultNS().equals(nsAlt))) {
            attr = doc.createAttributeNS(ns, p.getLocalName());
            attr.setPrefix(pref)
          }
          else attr = doc.createAttribute(p.getLocalName());
          attr.setNodeValue(s.getString());
          if (qualify) e.setAttributeNodeNS(attr);
          else e.setAttributeNode(attr);
        }
        done.add(s);
View Full Code Here

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

        a = doc.createAttributeNS(ns, def.getName());
        //if (Character.isLetterOrDigit(ns.charAt(ns.length()-1))) ns += "#";
        a.setPrefix(ctx.getModel().getNsURIPrefix(ns));
        e.setAttributeNodeNS(a);
      }
      else e.setAttributeNode(a = doc.createAttribute(def.getName()));

      XMLBean t = get_type(ctx);
      if (t instanceof simpleType) ((simpleType) t).toXML(a,object,ctx);
      else if (type != null && type.endsWith("IDREFS"))
        xs.listToXML(a,(RDFList) object.as(RDFList.class),XSD.IDREF.getURI(),ctx);
View Full Code Here

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

                                // //$NON-NLS-1$
        root.appendChild(node);

        NamedNodeMap attributes = node.getAttributes();

        Attr name = document.createAttribute(NAME_ATTRIBUTE);
        name.setValue(template.getName());
        attributes.setNamedItem(name);

        Attr description = document
            .createAttribute(DESCRIPTION_ATTRIBUTE);
View Full Code Here

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

        Attr name = document.createAttribute(NAME_ATTRIBUTE);
        name.setValue(template.getName());
        attributes.setNamedItem(name);

        Attr description = document
            .createAttribute(DESCRIPTION_ATTRIBUTE);
        description.setValue(template.getDescription());
        attributes.setNamedItem(description);

        Attr context = document.createAttribute(CONTEXT_ATTRIBUTE);
View Full Code Here

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

        Attr description = document
            .createAttribute(DESCRIPTION_ATTRIBUTE);
        description.setValue(template.getDescription());
        attributes.setNamedItem(description);

        Attr context = document.createAttribute(CONTEXT_ATTRIBUTE);
        context.setValue(template.getContextTypeName());
        attributes.setNamedItem(context);

        Attr enabled = document.createAttribute(ENABLED_ATTRIBUTE);
        enabled.setValue(template.isEnabled() ? "true" : "false"); //$NON-NLS-1$ //$NON-NLS-2$
View Full Code Here

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

        Attr context = document.createAttribute(CONTEXT_ATTRIBUTE);
        context.setValue(template.getContextTypeName());
        attributes.setNamedItem(context);

        Attr enabled = document.createAttribute(ENABLED_ATTRIBUTE);
        enabled.setValue(template.isEnabled() ? "true" : "false"); //$NON-NLS-1$ //$NON-NLS-2$
        attributes.setNamedItem(enabled);

        Text pattern = document.createTextNode(template.getPattern());
        node.appendChild(pattern);
View Full Code Here

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

                document.setXmlVersion("1.0");//$NON-NLS-1$
            document.setXmlStandalone(true);
            root = document.createElement(LNamespace.XML_ROOT_PREFERENCES);
            document.appendChild(root);

            final Attr attr = document.createAttribute(LNamespace.XML_VERSION);
            attr.setTextContent(VersionChecker.VERSION);
            root.setAttributeNode(attr);

            elt = document.createElement(LNamespace.XML_RENDERING);
            elt.setTextContent(String.valueOf(renderingCheckBox.isSelected()));
View Full Code Here

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

    // new attribute
    Document doc = getOwnerDocument();
    if (doc == null)
      return;
    attr = doc.createAttribute(name);
    if (attr == null)
      return;
    attr.setValue(value);
    appendAttributeNode(attr);
  }
View Full Code Here

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

            }
        }
        Document doc = DOMUtils.createDocument();
        Element el = doc.createElementNS(ns,
                                         "wsp:" + PolicyConstants.POLICYREFERENCE_ELEM_NAME);
        Attr att = doc.createAttribute("URI");
        att.setValue(uri);
        el.setAttributeNodeNS(att);
        return el;
    }
View Full Code Here

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

      if (oldDate == null) {
        System.err.println("Attr == null");
        continue;
      }
      Element newEventList = newDocument.createElement(TAG_SESSION_EVENT_LIST);
      Attr newDate = newDocument.createAttribute(oldDate.getName());
      newDate.setValue(oldDate.getValue());
      newEventList.setAttributeNode(newDate);
      newRoot.appendChild(newEventList);
     
      NodeList oldEvents = oldEventList.getElementsByTagName(TAG_PERSPECTIVE_EVENT);
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.