line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package XML::XForms::Generator::Extension; |
2
|
|
|
|
|
|
|
###################################################################### |
3
|
|
|
|
|
|
|
## ## |
4
|
|
|
|
|
|
|
## Package: Extension.pm ## |
5
|
|
|
|
|
|
|
## Author: D. Hageman ## |
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
|
|
|
|
|
|
|
require 5.006; |
19
|
|
|
|
|
|
|
require Exporter; |
20
|
|
|
|
|
|
|
|
21
|
5
|
|
|
5
|
|
3996
|
use strict; |
|
5
|
|
|
|
|
10
|
|
|
5
|
|
|
|
|
273
|
|
22
|
5
|
|
|
5
|
|
29
|
use warnings; |
|
5
|
|
|
|
|
9
|
|
|
5
|
|
|
|
|
141
|
|
23
|
|
|
|
|
|
|
|
24
|
5
|
|
|
5
|
|
25
|
use Carp; |
|
5
|
|
|
|
|
9
|
|
|
5
|
|
|
|
|
321
|
|
25
|
5
|
|
|
5
|
|
2917
|
use XML::LibXML; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
our @ISA = qw( Exporter ); |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
our $VERSION = "0.70"; |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
## tag for backwards compatibility ## |
66
|
|
|
|
|
|
|
## with HTML. ## |
67
|
|
|
|
|
|
|
##----------------------------------------------## |
68
|
|
|
|
|
|
|
sub xforms_extension_html |
69
|
|
|
|
|
|
|
{ |
70
|
|
|
|
|
|
|
my $attributes = shift; |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
my $html = XML::LibXML::Element->new( "html" ); |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
foreach( keys( %{ $attributes } ) ) |
75
|
|
|
|
|
|
|
{ |
76
|
|
|
|
|
|
|
$html->setAttribute( $_, $attributes->{$_} ); |
77
|
|
|
|
|
|
|
} |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
return( $html ); |
80
|
|
|
|
|
|
|
} |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
##==================================================================## |
83
|
|
|
|
|
|
|
## End of Code ## |
84
|
|
|
|
|
|
|
##==================================================================## |
85
|
|
|
|
|
|
|
1; |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
##==================================================================## |
88
|
|
|
|
|
|
|
## Plain Old Documentation (POD) ## |
89
|
|
|
|
|
|
|
##==================================================================## |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
__END__ |