Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
bin
 
 
 
 
t
 
 
 
 
 
 
 
 
 
 
 
 
 
 

XHTML::Writer

Build Status

Write xhtml elements utilising named arguments to guard against typos. Colons in names of XHTML attributes are replaced with a hyphen (e.g. xml:lang). Use the the html element names as an import tag or :ALL to get them all. Please note that there is a dd-tag what will overwrite dd from the settings.

The actual module is generated form the official XHTML 1.1 Schema. There is no offical XML Schema for HTML5 (because it isn't XML), if you happen to come a cross one that works please let me know.

Usage:

use v6;
use XHTML::Writer :ALL;

put html( xml-lang=>'de', 
	body(
        div( id=>"uniq",
          p( class=>"abc", 'your text here'),
          p( 'more text' )
        )
    ));

With skeleton:

use v6;
use XHTML::Writer :p, :title;
use XHTML::Skeleton;

put xhtml-skeleton(p('Hello Camelia!'), header=>title('Hello Camelia'));

Enable indentation

use Typesafe::XHTML::Writer :writer-shall-indent; # :ALL will work too
writer-shall-indent True;

License

(c) Wenzel P. P. Peppmeyer, Released under Artistic License 2.0.

About

Generate XHTML1.1 with subs (many, many subs)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published