The manakai project

Web::DOM::AttributeDefinition

DOM AttributeDefinition object

DESCRIPTION

The Web::DOM::AttributeDefinition class implements the DOM AttributeDefinition interface.

METHODS

In addition to the methods of classes Web::DOM::EventTarget and Web::DOM::Node, following methods are available:

$arrayref = $def->allowed_tokens

Return the array reference containing the allowed tokens of the attribute definitions. The array reference can be modified by the application. [DOMDTDEF] [DOMPERL]

$def->allowed_tokens ([$string1, $string2, ...])

Clear the list of allowed tokens and add the strings contained in the array reference specified as the argument. [DOMDTDEF] [DOMPERL]

$type = $adef->declared_type
$adef->declared_type ($type)

Return or set the declared type of the attribute definition, using one of the constants for the declared type as described in the later section. [DOMDTDEF]

$type = $adef->default_type
$adef->default_type ($type)

Return or set the default type of the attribute definition, using one of the constants for the default type as described in the later section. [DOMDTDEF]

$dt = $adef->owner_element_type_definition

Return the element type (Web::DOM::ElementTypeDefinition) to which the attribute definition belongs, if any, or undef. [DOMDTDEF]

The attribute definition name can be accessed by the $adef->node_name method. The default value can be returned or set by the $adef->node_value method.

CONSTANTS

Constants are exported from the Web::DOM::AttributeDefinition module by default. In addition, they are accessible as methods of AttributeDefinition objects.

Following declared type constants used by the declared_type attribute are exported [DOMDTDEF]:

NO_TYPE_ATTR CDATA_ATTR ID_ATTR IDREF_ATTR IDREFS_ATTR ENTITY_ATTR ENTITIES_ATTR NMTOKEN_ATTR NMTOKENS_ATTR NOTATION_ATTR ENUMERATION_ATTR UNKNOWN_ATTR

Following default type constants used by the default_type attribute are exported [DOMDTDEF]:

UNKNOWN_DEFAULT FIXED_DEFAULT REQUIRED_DEFAULT IMPLIED_DEFAULT EXPLICIT_DEFAULT

SPECIFICATION

DOMDTDEF

DOM Document Type Definitions <http://suika.suikawiki.org/www/markup/xml/domdtdef/domdtdef>.

SEE ALSO

Web::DOM::Node, Web::DOM::ElementTypeDefinition.

AUTHOR

Wakaba <wakaba@suikawiki.org>.

LICENSE

Copyright 2012-2014 Wakaba <wakaba@suikawiki.org>.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.