/** * 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); }
/** * 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); }