HTML-Doctype
view release on metacpan or search on metacpan
HTML-Doctype
============
Fun stuff with document type declarations in HTML / XHTML / XML
documents.
INSTALLATION
To install this module type the following:
perl Makefile.PL
make
make test
make install
lib/HTML/Doctype.pm view on Meta::CPAN
my @comp = split(/\/\//, $puid);
# malformed public identifiers mean HTML
return $self->_type("HTML", $doct) unless @comp > 2;
# we might want something different than \s and \S here
# but it is not clear to me what exactly we should expect
return $self->_type("HTML", $doct) unless $comp[2] =~ /^DTD\s+(\S+)/;
# the first token of the public text description must include
# the string "XHTML", see XHTML M12N section 3.1, and see also
# http://w3.org/mid/41584c61.156809450@smtp.bjoern.hoehrmann.de
return $self->_type("HTML", $doct) unless $1 =~ /XHTML/;
# otherwise considers this document XHTML
return $self->_type("XHTML", $doct)
}
sub start_element
{
my $self = shift;
( run in 2.062 seconds using v1.01-cache-2.11-cpan-411bb0df24b )