From 699a411061af6ba0696493013acd5a2a45772164 Mon Sep 17 00:00:00 2001 From: Toddr Bot Date: Thu, 23 Apr 2026 09:42:05 +0000 Subject: [PATCH] docs: fix Doctype handler Internal parameter documentation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Doctype handler documentation in Parser.pm incorrectly described the Internal parameter as a string containing the internal subset. In reality, the XS code (doctypeStart) passes PL_sv_yes/PL_sv_no — a boolean indicating whether an internal subset exists. This matches the correct documentation already in Expat.pm. Also fix DoctypeFin handler parameter name from (Parser) to (Expat) for consistency with all other handlers in Parser.pm, and add missing "true" in Expat.pm isname() method documentation. Co-Authored-By: Claude Opus 4.6 --- Expat/Expat.pm | 2 +- Parser.pm | 15 +++++---------- README.md | 15 +++++---------- 3 files changed, 11 insertions(+), 21 deletions(-) diff --git a/Expat/Expat.pm b/Expat/Expat.pm index 04ded31..94cba71 100644 --- a/Expat/Expat.pm +++ b/Expat/Expat.pm @@ -1431,7 +1431,7 @@ false otherwise. =item isname -This method returns if the object is an element name. +This method returns true if the object is an element name. =item ischoice diff --git a/Parser.pm b/Parser.pm index c938e8c..4830e09 100644 --- a/Parser.pm +++ b/Parser.pm @@ -748,16 +748,11 @@ If Fixed is true, then this is a fixed attribute. This handler is called for DOCTYPE declarations. Name is the document type name. Sysid is the system id of the document type, if it was provided, otherwise it's undefined. Pubid is the public id of the document type, -which will be undefined if no public id was given. Internal is the internal -subset, given as a string. If there was no internal subset, it will be -undefined. Internal will contain all whitespace, comments, processing -instructions, and declarations seen in the internal subset. The declarations -will be there whether or not they have been processed by another handler -(except for unparsed entities processed by the Unparsed handler). However, -comments and processing instructions will not appear if they've been processed -by their respective handlers. - -=head2 * DoctypeFin (Parser) +which will be undefined if no public id was given. Internal will be +true or false, indicating whether or not the doctype declaration contains +an internal subset. + +=head2 * DoctypeFin (Expat) This handler is called after parsing of the DOCTYPE declaration has finished, including any internal or external DTD declarations. diff --git a/README.md b/README.md index 6b616db..444020f 100644 --- a/README.md +++ b/README.md @@ -411,16 +411,11 @@ If Fixed is true, then this is a fixed attribute. This handler is called for DOCTYPE declarations. Name is the document type name. Sysid is the system id of the document type, if it was provided, otherwise it's undefined. Pubid is the public id of the document type, -which will be undefined if no public id was given. Internal is the internal -subset, given as a string. If there was no internal subset, it will be -undefined. Internal will contain all whitespace, comments, processing -instructions, and declarations seen in the internal subset. The declarations -will be there whether or not they have been processed by another handler -(except for unparsed entities processed by the Unparsed handler). However, -comments and processing instructions will not appear if they've been processed -by their respective handlers. - -## \* DoctypeFin (Parser) +which will be undefined if no public id was given. Internal will be +true or false, indicating whether or not the doctype declaration contains +an internal subset. + +## \* DoctypeFin (Expat) This handler is called after parsing of the DOCTYPE declaration has finished, including any internal or external DTD declarations.