/** * Sets an FXG attribute on this text node. Delegates to the parent class to process attributes * that are not in the list below. * * @param name - the unqualified attribute name. * @param value - the attribute value. * @see com.adobe.internal.fxg.dom.AbstractFXGNode#addChild(FXGNode) */ @Override public void setAttribute(String name, String value) { if (FXG_ID_ATTRIBUTE.equals(name)) { id = value; } else { super.setAttribute(name, value); return; } // Remember attribute was set on this node. rememberAttribute(name, value); }
/** * Check child node to ensure that exception isn't thrown for ignorable white spaces. * * @param child - a child FXG node to be added to this node. */ public void addChild(FXGNode child) { if (content == null) { if (child instanceof CDATANode && TextHelper.ignorableWhitespace(((CDATANode) child).content)) { /** * Ignorable white spaces don't break content contiguous rule and should be ignored if they * are at the beginning of a element value. */ return; } } else { super.addChild(child); } }