The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

XML::Catalogs::HTML - Catalog of HTML and XHTML DTDs

VERSION

Version 1.0.1

SYNOPSIS

    use XML::Catalogs::HTML -libxml;

        ---

    use XML::Catalogs::HTML;

    XML::Catalogs::HTML->notify_libxml();

        ---

    use XML::Catalogs::HTML;

    my $url  = XML::Catalogs::HTML->get_catalog_url();
    my $path = XML::Catalogs::HTML->get_catalog_path();

DESCRIPTION

To properly parse named entities in an XML document, the parser must have access to the XML subformat's DTDs.

XML::LibXML, for one, does not cache DTDs it downloads. Instead, it relies on them being in the system's XML catalog. This is not always configured properly for a number of reasons.

An XML catalog is simply a set of DTDs and a table of contents that associates DTD identifiers with the DTDs.

This module provides a catalog of HTML and XHTML DTDs in case they are not present in the system's catalog.

It works on all platforms, it works without requiring root priviledges, and it works with CPAN's dependency system.

Currently, only the DTDs for HTML 4.01 and XHTML 1.0 are included in this distribution. Please let me know if you need earlier versions.

CLASS METHODS

use XML::Catalogs::HTML -libxml

This loads XML::Catalogs::HTML and calls XML::Catalogs::HTML->notify_libxml()

XML::Catalogs::HTML->notify_libxml()

This method informs XML::LibXML of this catalog. XML::LibXML will use the local DTDs when parsing HTML and XHTML documents. This only affects the current process.

This mechanism does not stop working when XML::LibXML's ->no_network(1) option is used. When using that option, XML::LibXML refrains from downloading remote resources.

XML::Catalogs::HTML->get_catalog_url()

Returns a file:// URL to the catalog.

XML::Catalogs::HTML->get_catalog_path()

Returns the file path of the catalog.

SEE ALSO

BUGS

Please report any bugs or feature requests to bug-XML-Catalogs-HTML at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=XML-Catalogs-HTML. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc XML::Catalogs::HTML

You can also look for information at:

AUTHOR

Eric Brine, <ikegami@adaelis.com>

COPYRIGHT & LICENSE

The .dtd and .ent files included in this distrubution are covered by Copyright. See the individual files for the notice. The may be distributed unmodified unmodified. See http://www.w3.org/Consortium/Legal/2002/copyright-documents-20021231 for the exact terms.

Everything else is public domain. No rights reserved.

Feel free to use this module as a model for your own XML::Catalogs::* module.