/** * 5. [specified] A flag indicating whether this attribute was actually * specified in the start-tag of its element, or was defaulted from the * DTD. * * @param attributeHandle the attribute handle * @return <code>true</code> if the attribute was specified; * <code>false</code> if it was defaulted. */ public boolean isAttributeSpecified(int attributeHandle) { int type = getNodeType(attributeHandle); if (DTM.ATTRIBUTE_NODE == type) { Attr attr = (Attr)getNode(attributeHandle); return attr.getSpecified(); } return false; }
/** * 5. [specified] A flag indicating whether this attribute was actually * specified in the start-tag of its element, or was defaulted from the * DTD. * * @param attributeHandle the attribute handle * @return <code>true</code> if the attribute was specified; * <code>false</code> if it was defaulted. */ public boolean isAttributeSpecified(int attributeHandle) { int type = getNodeType(attributeHandle); if (DTM.ATTRIBUTE_NODE == type) { Attr attr = (Attr)getNode(attributeHandle); return attr.getSpecified(); } return false; }
void outputContent(Node n, StringBuilder buf) { switch(n.getNodeType()) { case Node.ATTRIBUTE_NODE: { if (((Attr) n).getSpecified()) { buf.append(' '); outputQualifiedName(n, buf);
boolean isSpecified = ((Attr) attr).getSpecified(); boolean addAttr = true; boolean applyFilter = false;
boolean isSpecified = ((Attr) attr).getSpecified(); boolean addAttr = true; boolean applyFilter = false;
public boolean getSpecified() { return attr.getSpecified(); }
public boolean getSpecified() { return _delegate.getSpecified(); }
public Object getValue() { String value = attr.getValue(); if (value == null || (value.equals("") && !attr.getSpecified())) { return null; } return value; }
private boolean attributeHasIllegalOverride(Element element, String name, String allowed) { return element.getAttributeNode(name) != null && element.getAttributeNode(name).getSpecified() && !allowed.equals(element.getAttribute(name)); }
private boolean attributeHasIllegalOverride(Element element, String name, String allowed) { return element.getAttributeNode(name) != null && element.getAttributeNode(name).getSpecified() && !allowed.equals(element.getAttribute(name)); }
protected boolean parseAttribute(Element element, Attr node, ParserContext ctx, BeanDefinitionBuilder bean) { if (!node.getSpecified() && "start".equals(node.getLocalName())) { return false; } return super.parseAttribute(element, node, ctx, bean); }
/** * Returns whether the given element has a particular attribute and that * it exists due to being specified explicitly, rather than being defaulted * from a DTD. */ public static boolean isAttributeSpecifiedNS(Element e, String namespaceURI, String localName) { Attr a = e.getAttributeNodeNS(namespaceURI, localName); return a != null && a.getSpecified(); } }
/** * Returns whether the given element has a particular attribute and that * it exists due to being specified explicitly, rather than being defaulted * from a DTD. */ public static boolean isAttributeSpecifiedNS(Element e, String namespaceURI, String localName) { Attr a = e.getAttributeNodeNS(namespaceURI, localName); return a != null && a.getSpecified(); } }
protected boolean parseAttribute(Element element, Attr node, ParserContext ctx, BeanDefinitionBuilder bean) { if (!node.getSpecified() && "start".equals(node.getLocalName())) { return false; } return super.parseAttribute(element, node, ctx, bean); }
public boolean isAttributeSpecified(int index) { if (mCurrEvent != START_ELEMENT) { throw new IllegalStateException(ErrorConsts.ERR_STATE_NOT_STELEM); } Element elem = (Element) mCurrNode; Attr attr = (Attr) elem.getAttributes().item(index); if (attr == null) { handleIllegalAttrIndex(index); return false; } return attr.getSpecified(); }
public boolean isAttributeSpecified(int index) { if (mCurrEvent != START_ELEMENT) { throw new IllegalStateException(ErrorConsts.ERR_STATE_NOT_STELEM); } Element elem = (Element) mCurrNode; Attr attr = (Attr) elem.getAttributes().item(index); if (attr == null) { handleIllegalAttrIndex(index); return false; } return attr.getSpecified(); }
/** * Returns whether the given element has a particular attribute and that * it exists due to being specified explicitly, rather than being defaulted * from a DTD. */ public static boolean isAttributeSpecifiedNS(Element e, String namespaceURI, String localName) { Attr a = e.getAttributeNodeNS(namespaceURI, localName); return a != null && a.getSpecified(); } }
public boolean isAttributeSpecified(int index) { if (mCurrEvent != START_ELEMENT) { throw new IllegalStateException(ErrorConsts.ERR_STATE_NOT_STELEM); } Element elem = (Element) mCurrNode; Attr attr = (Attr) elem.getAttributes().item(index); if (attr == null) { handleIllegalAttrIndex(index); return false; } return attr.getSpecified(); }
public boolean isAttributeSpecified(int index) { if (_currEvent != START_ELEMENT) { reportWrongState(ERR_STATE_NOT_START_ELEM); } Element elem = (Element) _currNode; Attr attr = (Attr) elem.getAttributes().item(index); if (attr == null) { handleIllegalAttrIndex(index); return false; } return attr.getSpecified(); }
@Override public ComparisonState apply() { return compare(new Comparison(ComparisonType.ATTR_VALUE_EXPLICITLY_SPECIFIED, control, getXPath(controlContext), control.getSpecified(), getParentXPath(controlContext), test, getXPath(testContext), test.getSpecified(), getParentXPath(testContext))); } };