| 1 | package XML::XForms::Generator::Extension; | ||
| 2 | ###################################################################### | ||
| 3 | ## ## | ||
| 4 | ## Package: Extension.pm ## | ||
| 5 | ## Author: D. Hageman <dhageman@dracken.com> ## | ||
| 6 | ## ## | ||
| 7 | ## Description: ## | ||
| 8 | ## ## | ||
| 9 | ## Perl object to assist in the generation of XML compliant with ## | ||
| 10 | ## the W3's XForms specification. ## | ||
| 11 | ## ## | ||
| 12 | ###################################################################### | ||
| 13 | |||
| 14 | ##==================================================================## | ||
| 15 | ## Libraries and Variables ## | ||
| 16 | ##==================================================================## | ||
| 17 | |||
| 18 | 5 | require 5.006; | |
| 19 | 5 | require Exporter; | |
| 20 | |||
| 21 | 5 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 22 | 5 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 23 | |||
| 24 | 5 | ▶ | use Carp; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 25 | 5 | ▶ | use XML::LibXML; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 26 | |||
| 27 | 5 | our @ISA = qw( Exporter ); | |
| 28 | |||
| 29 | 5 | our $VERSION = "0.70"; | |
| 30 | |||
| 31 | 5 | our @EXPORT = qw( xforms_extension_html ); | |
| 32 | |||
| 33 | ##==================================================================## | ||
| 34 | ## Constructor(s)/Deconstructor(s) ## | ||
| 35 | ##==================================================================## | ||
| 36 | |||
| 37 | ## | ||
| 38 | ## None. | ||
| 39 | ## | ||
| 40 | |||
| 41 | ##==================================================================## | ||
| 42 | ## Method(s) ## | ||
| 43 | ##==================================================================## | ||
| 44 | |||
| 45 | ## | ||
| 46 | ## None. | ||
| 47 | ## | ||
| 48 | |||
| 49 | ##==================================================================## | ||
| 50 | ## Function(s) ## | ||
| 51 | ##==================================================================## | ||
| 52 | |||
| 53 | ## | ||
| 54 | ## None. | ||
| 55 | ## | ||
| 56 | |||
| 57 | ##==================================================================## | ||
| 58 | ## Internal Function(s) ## | ||
| 59 | ##==================================================================## | ||
| 60 | |||
| 61 | ##----------------------------------------------## | ||
| 62 | ## xforms_extension_html ## | ||
| 63 | ##----------------------------------------------## | ||
| 64 | ## Generates a tag to be appended to the ## | ||
| 65 | ## <extension> tag for backwards compatibility ## | ||
| 66 | ## with HTML. ## | ||
| 67 | ##----------------------------------------------## | ||
| 68 | sub xforms_extension_html | ||
| 69 | 1 | ▶ | { |
|
Subroutine
xforms_extension_html: called CC=2 SCAR=6.9
Pod
documented
| |||
| 70 | 1 | my $attributes = shift; | |
| 71 | |||
| 72 | 1 | my $html = XML::LibXML::Element->new( "html" ); | |
| 73 | |||
| 74 | 1 | foreach( keys( %{ $attributes } ) ) | |
| 75 | { | ||
| 76 | 1 | $html->setAttribute( $_, $attributes->{$_} ); | |
| 77 | } | ||
| 78 | |||
| 79 | 1 | return( $html ); | |
| 80 | } | ||
| 81 | |||
| 82 | ##==================================================================## | ||
| 83 | ## End of Code ## | ||
| 84 | ##==================================================================## | ||
| 85 | 5 | 1; | |
| 86 | |||
| 87 | ##==================================================================## | ||
| 88 | ## Plain Old Documentation (POD) ## | ||
| 89 | ##==================================================================## | ||
| 90 | |||
| 91 | __END__ | ||