{
    "content": [
        {
            "type": "text",
            "text": "# HTML::Tagset (perldoc)\n\n## NAME\n\nHTML::Tagset - data tables useful in parsing HTML\n\n## SYNOPSIS\n\nuse HTML::Tagset;\n# Then use any of the items in the HTML::Tagset package\n#  as need arises\n\n## DESCRIPTION\n\nThis module contains several data tables useful in various kinds of HTML parsing operations.\n\n## Sections\n\n- **NAME**\n- **VERSION**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **VARIABLES**\n- **CAVEATS**\n- **SEE ALSO**\n- **ACKNOWLEDGEMENTS**\n- **AUTHOR**\n- **BUGS**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "HTML::Tagset",
        "section": "",
        "mode": "perldoc",
        "summary": "HTML::Tagset - data tables useful in parsing HTML",
        "synopsis": "use HTML::Tagset;\n# Then use any of the items in the HTML::Tagset package\n#  as need arises",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "VERSION",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 8,
                "subsections": []
            },
            {
                "name": "VARIABLES",
                "lines": 94,
                "subsections": []
            },
            {
                "name": "CAVEATS",
                "lines": 12,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 12,
                "subsections": []
            },
            {
                "name": "ACKNOWLEDGEMENTS",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "BUGS",
                "lines": 4,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "HTML::Tagset - data tables useful in parsing HTML\n",
                "subsections": []
            },
            "VERSION": {
                "content": "Version 3.20\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "use HTML::Tagset;\n# Then use any of the items in the HTML::Tagset package\n#  as need arises\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "This module contains several data tables useful in various kinds of HTML parsing operations.\n\nNote that all tag names used are lowercase.\n\nIn the following documentation, a \"hashset\" is a hash being used as a set -- the hash conveys\nthat its keys are there, and the actual values associated with the keys are not significant.\n(But what values are there, are always true.)\n",
                "subsections": []
            },
            "VARIABLES": {
                "content": "Note that none of these variables are exported.\n\nhashset %HTML::Tagset::emptyElement\nThis hashset has as values the tag-names (GIs) of elements that cannot have content. (For\nexample, \"base\", \"br\", \"hr\".) So $HTML::Tagset::emptyElement{'hr'} exists and is true.\n$HTML::Tagset::emptyElement{'dl'} does not exist, and so is not true.\n\nhashset %HTML::Tagset::optionalEndTag\nThis hashset lists tag-names for elements that can have content, but whose end-tags are\ngenerally, \"safely\", omissible. Example: $HTML::Tagset::emptyElement{'li'} exists and is true.\n\nhash %HTML::Tagset::linkElements\nValues in this hash are tagnames for elements that might contain links, and the value for each\nis a reference to an array of the names of attributes whose values can be links.\n\nhash %HTML::Tagset::booleanattr\nThis hash (not hashset) lists what attributes of what elements can be printed without showing\nthe value (for example, the \"noshade\" attribute of \"hr\" elements). For elements with only one\nsuch attribute, its value is simply that attribute name. For elements with many such attributes,\nthe value is a reference to a hashset containing all such attributes.\n\nhashset %HTML::Tagset::isPhraseMarkup\nThis hashset contains all phrasal-level elements.\n\nhashset %HTML::Tagset::isPossibleStrictPContent\nThis hashset contains all phrasal-level elements that be content of a P element, for a strict\nmodel of HTML.\n\nhashset %HTML::Tagset::isHeadElement\nThis hashset contains all elements that elements that should be present only in the 'head'\nelement of an HTML document.\n\nhashset %HTML::Tagset::isList\nThis hashset contains all elements that can contain \"li\" elements.\n\nhashset %HTML::Tagset::isTableElement\nThis hashset contains all elements that are to be found only in/under a \"table\" element.\n\nhashset %HTML::Tagset::isFormElement\nThis hashset contains all elements that are to be found only in/under a \"form\" element.\n\nhashset %HTML::Tagset::isBodyElement\nThis hashset contains all elements that are to be found only in/under the \"body\" element of an\nHTML document.\n\nhashset %HTML::Tagset::isHeadOrBodyElement\nThis hashset includes all elements that I notice can fall either in the head or in the body.\n\nhashset %HTML::Tagset::isKnown\nThis hashset lists all known HTML elements.\n\nhashset %HTML::Tagset::canTighten\nThis hashset lists elements that might have ignorable whitespace as children or siblings.\n\narray @HTML::Tagset::pclosurebarriers\nThis array has a meaning that I have only seen a need for in \"HTML::TreeBuilder\", but I include\nit here on the off chance that someone might find it of use:\n\nWhen we see a \"<p>\" token, we go lookup up the lineage for a p element we might have to\nminimize. At first sight, we might say that if there's a p anywhere in the lineage of this new\np, it should be closed. But that's wrong. Consider this document:\n\n<html>\n<head>\n<title>foo</title>\n</head>\n<body>\n<p>foo\n<table>\n<tr>\n<td>\nfoo\n<p>bar\n</td>\n</tr>\n</table>\n</p>\n</body>\n</html>\n\nThe second p is quite legally inside a much higher p.\n\nMy formalization of the reason why this is legal, but this:\n\n<p>foo<p>bar</p></p>\n\nisn't, is that something about the table constitutes a \"barrier\" to the application of the rule\nabout what p must minimize.\n\nSo @HTML::Tagset::pclosurebarriers is the list of all such barrier-tags.\n\nhashset %isCDATAParent\nThis hashset includes all elements whose content is CDATA.\n",
                "subsections": []
            },
            "CAVEATS": {
                "content": "You may find it useful to alter the behavior of modules (like \"HTML::Element\" or\n\"HTML::TreeBuilder\") that use \"HTML::Tagset\"'s data tables by altering the data tables\nthemselves. You are welcome to try, but be careful; and be aware that different modules may or\nmay react differently to the data tables being changed.\n\nNote that it may be inappropriate to use these tables for *producing* HTML -- for example,\n%isHeadOrBodyElement lists the tagnames for all elements that can appear either in the head or\nin the body, such as \"script\". That doesn't mean that I am saying your code that produces HTML\nshould feel free to put script elements in either place! If you are producing programs that spit\nout HTML, you should be *intimately* familiar with the DTDs for HTML or XHTML (available at\n\"http://www.w3.org/\"), and you should slavishly obey them, not the data tables in this document.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "HTML::Element, HTML::TreeBuilder, HTML::LinkExtor\n\nCOPYRIGHT & LICENSE\nCopyright 1995-2000 Gisle Aas.\n\nCopyright 2000-2005 Sean M. Burke.\n\nCopyright 2005-2008 Andy Lester.\n\nThis program is free software; you can redistribute it and/or modify it under the same terms as\nPerl itself.\n",
                "subsections": []
            },
            "ACKNOWLEDGEMENTS": {
                "content": "Most of the code/data in this module was adapted from code written by Gisle Aas for\n\"HTML::Element\", \"HTML::TreeBuilder\", and \"HTML::LinkExtor\". Then it was maintained by Sean M.\nBurke.\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Current maintainer: Andy Lester, \"<andy at petdance.com>\"\n",
                "subsections": []
            },
            "BUGS": {
                "content": "Please report any bugs or feature requests to \"bug-html-tagset at rt.cpan.org\", or through the\nweb interface at <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=HTML-Tagset>. I will be\nnotified, and then you'll automatically be notified of progress on your bug as I make changes.\n",
                "subsections": []
            }
        }
    }
}