CleanCode Perl Libraries
Multi-Lingual Library Maintainability
available: Perl not available: Java not available: JavaScript available: Certified
Class
not available: Testable
Class
not available: Standalone
Mode
not available: Diagnostic
Enabled

NAME

HTML::XGenerator - Provides XHTML formatting for output.

SYNOPSIS

        use HTML::XGenerator;
        $gen = HTML::XGenerator->new();

[ See the HTML::Generator synopsis ]

EXTENDS

HTML::Generator

REQUIRES

Perl5.005, HTML::Generator

DESCRIPTION

This module provides output formatted for web browsers using XHTML. It is a direct subclass of HTML::Generator and differs only in these aspects:

-- the doctype will be XHTML 1.0 transitional.

-- an attribute passed in on an attribute list without a value will generate a fully expanded attribute, e.g. "checked" will generate "checked='checked'".

-- elements with no contents will be abbreviated per XML standards, e.g. <p></p>will appear as <p />.

-- elements will always have an end tag to match a start tag, e.g. no instances of <p> without the subsequent </p>.

CONSTRUCTOR

new

PACKAGE->new()

Creates an HTML::XGenerator object which can be used to generate XHTML output.

Returns:

a newly created object

METHODS

generic

OBJ->generic(tag, s, attributes)

For tags which are not specifically provided for by other methods of this class, use the generic and genericNL methods. Returns <tag ... /> or <tag ... >s</tag> along with whatever attributes are specified. Patch for IE6: the <script> element will generate <script ...></script> instead of the abbreviated <script ... />.

Parameters:

tag - string; an arbitrary HTML tag

s - string to display between the <tag>...</tag> brackets.

attributes - optional; hash reference; attributes of the tag; each is inserted in the <tag> brackets as <tag attr="val">

Returns:

<tag ... /> or <tag ... >s</tag>

All other methods are inherited from HTML::Generator.

BUGS

none

TO BE DONE

none

AUTHOR

Michael Sorens

VERSION

$Revision: 278 $ $Date: 2008-05-26 22:44:56 -0700 (Mon, 26 May 2008) $

SINCE

CleanCode 0.9

SEE ALSO

perldoc, pod2html, HTML::Generator

POD ERRORS

Hey! The above document had some coding errors, which are explained below:

Around line 115:

=back doesn't take any parameters, but you said =back -- end of CONSTRUCTOR section

Around line 166:

=back doesn't take any parameters, but you said =back -- end of METHODS section


CleanCode Perl Libraries Copyright © 2001-2013 Michael Sorens - Revised 2013.06.30 Get CleanCode at SourceForge.net. Fast, secure and Free Open Source software downloads