Checks if the specified element has an attribute with the specified name.

This function bypasses any special processing of attributes implied by the DSM Type. Instead, it calls directly the W3C DOM method:

org.w3c.dom.Element.hasAttribute()
and returns its result.

Parameters:

element

The element whose attribute is requested. If not specified, the generator context element is assumed, i.e. the same as the call: hasXMLAttribute(contextElement,attrName)

Note: When called for a pseudo-element, this function works the same as hasAttr() function. (See also DSMElement.pseudoElement property.)

attrName
The attribute name.

Returns:

true if the element contains an attribute with the given name; false otherwise.

See Also:

getXMLAttribute(), setXMLAttribute(), removeXMLAttribute(), hasAttr()