NAME
SGML::SData - an SGML, XML, or HTML document SData replacement
SYNOPSIS
$sdata = SGML::SData->new ($replacement[, $entity_name]);
$data = $sdata->data;
$name = $sdata->name;
$sdata->as_string([$context, ...]);
$sdata->iter;
$sdata->accept($visitor, ...);
$sdata->accept_gi($visitor, ...);
$sdata->children_accept($visitor, ...);
$sdata->children_accept_gi($visitor, ...);
DESCRIPTION
SGML::SData
objects are loaded by SGML::SPGrove
. An SGML::SData
contains the replacement value of a character entity reference.
$sdata->data
returns the data of the SData object.
$sdata->name
returns the entity name of the SData object.
The Perl module Text::EntityMap
can be used to map commonly used character entity sets to common output formats.
$sdata->as_string([$context, ...])
returns data
surrounded by brackets (`[ ... ]') unless $context->{sdata_mapper}
is defined, in which case it returns the result of calling the sdata_mapper
subroutine with data
and the remaining arguments. The actual implementation is:
&{$context->{sdata_mapper}} ($self->data, @_);
$sdata->iter
returns an iterator for the sdata object, see Class::Visitor
for details.
$sdata->accept($visitor[, ...])
issues a call back to $visitor->visit_SGML_SData($sdata[, ...])
. See examples visitor.pl
and simple-dump.pl
for more information.
$sdata->accept_gi($visitor[, ...])
is implemented as a synonym for accept
.
children_accept
and children_accept_gi
do nothing.
AUTHOR
Ken MacLeod, ken@bitsko.slc.ut.us
SEE ALSO
perl(1), SGML::SPGrove(3), Text::EntityMap(3), SGML::Element(3), SGML::PI(3), Class::Visitor(3).