Skip to content
Generate XHTML1.1 with subs (many, many subs)
Perl 6 Makefile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
3rd-party
bin
lib/XHTML
t
.travis.yml
Build.pm
LICENSE
META.info
META6.json
Makefile
README.md

README.md

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.

You can’t perform that action at this time.