예제 #1
0
파일: MRem.java 프로젝트: asami/xmlsmartdoc
 /**
  * Creates a DOM representation of the object. Result is appended to the Node <code>parent</code>.
  *
  * @param parent
  */
 public void makeElement(Node parent) {
   Document doc;
   if (parent instanceof Document) {
     doc = (Document) parent;
   } else {
     doc = parent.getOwnerDocument();
   }
   Element element = doc.createElement("rem");
   int size;
   if (definitionURL != null) {
     URelaxer2.setAttributePropertyByString(
         element, "http://www.w3.org/1998/Math/MathML", "definitionURL", definitionURL);
   }
   if (classValue != null) {
     URelaxer2.setAttributePropertyByString(
         element, "http://www.w3.org/1998/Math/MathML", "class", classValue);
   }
   if (style != null) {
     URelaxer2.setAttributePropertyByString(
         element, "http://www.w3.org/1998/Math/MathML", "style", style);
   }
   if (id != null) {
     URelaxer2.setAttributePropertyByString(
         element, "http://www.w3.org/1998/Math/MathML", "id", id);
   }
   if (other != null) {
     URelaxer2.setAttributePropertyByString(
         element, "http://www.w3.org/1998/Math/MathML", "other", other);
   }
   parent.appendChild(element);
 }
예제 #2
0
파일: MSet.java 프로젝트: asami/xmlsmartdoc
 /**
  * Creates a DOM representation of the object. Result is appended to the Node <code>parent</code>.
  *
  * @param parent
  */
 public void makeElement(Node parent) {
   Document doc;
   if (parent instanceof Document) {
     doc = (Document) parent;
   } else {
     doc = parent.getOwnerDocument();
   }
   Element element = doc.createElement("set");
   int size;
   if (classValue != null) {
     URelaxer2.setAttributePropertyByString(
         element, "http://www.w3.org/1998/Math/MathML", "class", classValue);
   }
   if (style != null) {
     URelaxer2.setAttributePropertyByString(
         element, "http://www.w3.org/1998/Math/MathML", "style", style);
   }
   if (id != null) {
     URelaxer2.setAttributePropertyByString(
         element, "http://www.w3.org/1998/Math/MathML", "id", id);
   }
   if (other != null) {
     URelaxer2.setAttributePropertyByString(
         element, "http://www.w3.org/1998/Math/MathML", "other", other);
   }
   size = content.size();
   for (int i = 0; i < size; i++) {
     IMSetContent value = (IMSetContent) this.content.get(i);
     value.makeElement(element);
   }
   parent.appendChild(element);
 }