Removes an attribute by name from of the specified element.

This function is always guaranteed to work only with custom elements, which are created using CustomElement() function.

The ordinary DSM (Data Source Model) elements that are connected to the external data source may not allow removing attributes. That's because such attributes may be just virtual things maintained only by the DSM Type Driver via the calls to some external API. In such a case, using this function will lead to a DSM exception!


Currently, the only DSM Type Driver that allows changing attributes of the elements connected to the data source is XML DSM Driver, which works with XML files. This driver is a part of “DocFlex/XML” product. It does supports adding, removing or changing attributes, however, only for real XML element, not for special pseudo-elements maintained by the driver.

Parameters:

element

Specifies the element whose attribute is to be removed.

If not specified, the generator context element is assumed by default, which is the same as calling:

removeAttr(contextElement, attrName)
attrName
The name of the attribute to be removed.

Returns:

true if the attribute has been removed;
false if the element has no attribute with the specified name.

See Also:

hasAttr(), getAttrValue(), setAttr(), CustomElement()