NAME
XML::DTD::AttList - Perl module representing an ATTLIST declaration in an XML DTD.
SYNOPSIS
use XML::DTD::AttList;
my $entman = XML::DTD::EntityManager->new;
my $att = XML::DTD::AttList::new($entman, '<!ATTLIST a b CDATA #IMPLIED>');
DESCRIPTION
XML::DTD::AttList is a Perl module representing an ATTLIST
declaration in an XML DTD. The following methods are provided.
- new
-
$entman = XML::DTD::EntityManager->new; $attlist = new XML::DTD::AttList($entman, '<!ATTLIST a b CDATA #IMPLIED>'); Constructs a new XML::DTD::AttList object.
- writexml
-
$xo = new XML::Output({'fh' => *STDOUT}); $attlist->writexml($xo);
Write an XML representation of the attribute list.
- name
-
$eltname = $attlist->name();
Return the name of the element with which the attribute list is associated.
- attribnames
-
$nmlst = $attlist->attribnames;
Return an array of attribute names (associated with a specific element) as an array reference.
- attribute
-
$attdefobj = $attlist->attribute('attribname');
Return the attribution definition object (of type XML::DTD::AttDef) associated with the specified name.
- merge
-
$attlist->merge($otherattlist);
Merge another attribute list's attribute declarations with this one's. Where the same attribute name is declared in both, keep the one already in <$attlist>.
SEE ALSO
XML::DTD, XML::DTD::Component, XML::DTD::AttDef
AUTHOR
Brendt Wohlberg <wohl@cpan.org>
COPYRIGHT AND LICENSE
Copyright (C) 2004-2010 by Brendt Wohlberg
This library is available under the terms of the GNU General Public License (GPL), described in the GPL file included in this distribution.
ACKNOWLEDGMENTS
Peter Lamb <Peter.Lamb@csiro.au> improved entity substitution and corrected handling of multiple declarations of attributes for the same element.