view release on metacpan or search on metacpan
examples/web/cgi-bin/default.pl view on Meta::CPAN
print $session->header();
$session->flush();
## Content
print
qq|<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">|
. qq|<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">|
. qq|<head>|
. qq| <title></title>|
. qq| <link href="../Styles/Site.css" rel="stylesheet" type="text/css" />|
. qq| <link href="../Styles/jquery-ui-1.8.11.custom.css" rel="stylesheet" type="text/css" />|
view all matches for this distribution
view release on metacpan or search on metacpan
share/www/static/jquery.js view on Meta::CPAN
rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
rscriptType = /^$|\/(?:java|ecma)script/i,
rscriptTypeMasked = /^true\/(.*)/,
rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,
// We have to close these tags to support XHTML (#13200)
wrapMap = {
option: [ 1, "<select multiple='multiple'>", "</select>" ],
legend: [ 1, "<fieldset>", "</fieldset>" ],
area: [ 1, "<map>", "</map>" ],
param: [ 1, "<object>", "</object>" ],
view all matches for this distribution
view release on metacpan or search on metacpan
CAM-PDFTaxforms.htm view on Meta::CPAN
<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CAM::PDFTaxforms - CAM::PDF wrapper to also allow editing of checkboxes (ie. for IRS Tax forms).</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:root@localhost" />
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CAM/XML.pm view on Meta::CPAN
use English qw(-no_match_vars);
use Carp;
our $VERSION = '1.14';
=for stopwords XHTML XPath pre-formatted attr1 attr2
=head1 NAME
CAM::XML - Encapsulation of a simple XML data structure
lib/CAM/XML.pm view on Meta::CPAN
'/[@attr="value"]' means a node with this attribute value
'/text()' means all of the text data inside a node
(note this returns just one node, not all the nodes)
For example, C</html/body//table/tr[1]/td/a[@target="_blank"]>
searches an XHTML body for all tables, and returns all anchor nodes in
the first row which pop new windows.
Please note that while this syntax resembles XPath, it is FAR from a
complete (or even correct) implementation. It's useful for basic
delving into an XML document, however.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CGI/Alert.pm view on Meta::CPAN
Status: $status
Content-Type: text/html; charset=ISO-8859-1
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<title>$status</title>
</head>
view all matches for this distribution
view release on metacpan or search on metacpan
my $atr = (exists $hr->{-author}) ? $hr->{-author} : "";
my $tgt = (exists $hr->{-target}) ? $hr->{-target} : "";
my $t = "";
$t .= "Content-Type: text/html\n\n" if $add_ct;
# $t .= '<?xml version="1.0" encoding="iso-8859-1"?>' . "\n";
# $t .= '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"' . "\n";
# $t .= "\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n";
# $t .= '<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US">';
$t .= "<html>\n<head>\n";
$t .= " <title>$tit</title>\n" if $tit;
$t .= " <link rev=\"made\" href=\"mailto:$atr\" />\n" if $atr;
view all matches for this distribution
view release on metacpan or search on metacpan
caf_htdoc/index.html view on Meta::CPAN
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<title>CGI::Application::Framework</title>
view all matches for this distribution
view release on metacpan or search on metacpan
templates/header.tt view on Meta::CPAN
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<?xml version="1.0" encoding="iso-8859-1"?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
<head>
[% IF title %]<title>[% title %]</title>[% END %]
view all matches for this distribution
view release on metacpan or search on metacpan
share/error.tmpl view on Meta::CPAN
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Language" content="en" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><!-- TMPL_VAR name="error" --></title>
view all matches for this distribution
view release on metacpan or search on metacpan
example/templates/one.tmpl view on Meta::CPAN
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US">
<head>
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.8.1/build/reset-fonts-grids/reset-fonts-grids.css"/>
<link rel="stylesheet" type="text/css" href="/css/editor.css"/>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CGI/Application/Plugin/Authentication.pm view on Meta::CPAN
=over 4
=item DISPLAY_CLASS (default: Classic)
the class used to display the login form. The alternative is C<Basic>
which aims for XHTML compliance and leaving style to CSS. See
L<CGI::Application::Plugin::Authentication::Display> for more details.
=item TITLE (default: Sign In)
the heading at the top of the login box
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CGI/Application/Plugin/DevPopup.pm view on Meta::CPAN
$j;
}
$head = <<HEAD;
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Devpopup results</title>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CGI/Application/Plugin/ErrorPage.pm view on Meta::CPAN
=head2 Example error.html
Here's a very basic example of an C<error.html> file to get you started.
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US">
<head>
<title><!-- tmpl_var title escape=HTML --></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
view all matches for this distribution
view release on metacpan or search on metacpan
examples/PodViewer.pm view on Meta::CPAN
return $self->tt_process(\*DATA);
}
1;
__DATA__
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>CGI::Application::Plugin::HTMLPrototype - PodViewer Example</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
view all matches for this distribution
view release on metacpan or search on metacpan
t/ValidateSubApp.pm view on Meta::CPAN
use CGI::Application;
use base qw/ValidateApp/;
sub valid_html {
return q{<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Valid output</title>
view all matches for this distribution
view release on metacpan or search on metacpan
sample/potest/test.html view on Meta::CPAN
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title><tmpl_var name=title></title>
</head>
<body>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CGI/Application/Plugin/TmplInnerOuter.pm view on Meta::CPAN
#$self->{_tmpl_default} ||={};
if ($name eq 'main.html' and ! defined $self->{_tmpl_default}->{'main.html'}){
### main.html was not defined, using default hard coded main.html template
$self->_set_tmpl_default(
q{<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title><TMPL_VAR NAME=TITLE></title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
view all matches for this distribution
view release on metacpan or search on metacpan
AuthRegister.pm view on Meta::CPAN
sub gen_cas_page {
my $ret;
#<? my $c = getfile('cas-template/cas.html');
# echo "\$ret=<<'EOT';\n${c}EOT"; !>#+
$ret=<<'EOT';
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head><title>CAS - Central Authentication Service</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="Description" content="CAS - Central Authentication Service">
AuthRegister.pm view on Meta::CPAN
<div style="clear:both;"></div></div></div>
</body></html>
EOT#-
#+
$ret=<<'EOT';
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head><title>CAS - Central Authentication Service</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="Description" content="CAS - Central Authentication Service">
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CGI/Authen/Simple.pm view on Meta::CPAN
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
=cut
__DATA__
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>[% HTML_TITLE %]</title>
<style type="text/css">
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CGI/Bus.pm view on Meta::CPAN
# $s->pushmsg($ENV{CONTENT_TYPE});
no warnings;
$s->{-cgi} =(!$s->{-fcgimax} ? eval('CGI->new') : eval('CGI::Fast->new'))
||CGI::Carp::croak("'CGI->new' failure: $@\n");
$CGI::Q =$s->{-cgi};
$CGI::XHTML =0;
if ((($ENV{SERVER_SOFTWARE}||'') =~/IIS/)
|| ($ENV{MOD_PERL} && !$ENV{PERL_SEND_HEADER})) {
$CGI::NPH =1;
}
#CGI quote:
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CGI/ContactForm.pm view on Meta::CPAN
sub headprint {
my $args = shift;
print "Content-type: text/html; charset=$args->{encoding}\n\n";
print <<HEAD;
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>$args->{title} $args->{recname}</title>
<style type="text/css">
view all matches for this distribution
view release on metacpan or search on metacpan
erecipes/templates/content/main_wrapper.tthtml view on Meta::CPAN
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="bg" >
<head>
<title>CGI::Ex::Recipes Today: [% today %]</title>
<meta http-equiv="Content-Type" content="text/xml; charset=UTF-8" />
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CGI/FormBuilder.pm view on Meta::CPAN
statename => '_state',
extraname => '_extra',
dtd => <<'EOD', # modified from CGI.pm
<?xml version="1.0" encoding="{charset}"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="{lang}" xml:lang="{lang}">
EOD
);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CGI/Kwiki/Template.pm view on Meta::CPAN
</div><!-- close "links" -->
</body>
</html>
__blog_header__
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=[% encoding %]" />
<title>[% title_prefix %]: {{Blog}}</title>
lib/CGI/Kwiki/Template.pm view on Meta::CPAN
</div><!-- close "links" -->
</body>
</html>
__display_header__
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=[% encoding %]" />
<title>[% title_prefix %]: [% page_id %]</title>
lib/CGI/Kwiki/Template.pm view on Meta::CPAN
<hr />
__protected_edit_body__
<b>{{This is a protected page. Only the site administrator can edit it.}}</b>
__slide_page__
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=[% encoding %]" />
<title>[% page_id %] - {{KwikiSlides}}</title>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CGI/Minimal.pod view on Meta::CPAN
Starting with the 1.12 version, CGI::Minimal accepts the ';' character
as a form field seperator in addition to the '&'.
IOW: a=b;c=d will decode as well as a=b&c=d in form submissions. This is
to provide SGML/XML/XHTML compatibility for those needing it. Since ';' has
always been escaped to %3e by the url_encode method, this should only affect
people who are already doing the wrong thing with their forms by
not escaping their data correctly. This is also compatible with what the CGI.pm
module does.
view all matches for this distribution
view release on metacpan or search on metacpan
These methods *have* been tested, with all their argument variations:
to_url_encoded_string(), from_url_encoded_string().
* Updated the HTML generating methods in CGI::MultiValuedHash,
to_html_encoded_table() and to_html_encoded_hidden_fields(), to add support
for the stricter requirements of W3C's XHTML standard where possible. See
"http://www.w3.org/TR/xhtml1" for details on how this standard compares to
HTML 4. Mainly this means that the HTML now has lowercased tag and
attribute names, and solitary tags like 'input' and 'br' have a trailing
slash in them (eg: '<br />'). However, the changes should be
backwards-compatible with older user agents (web browsers). A bug was also
view all matches for this distribution
view release on metacpan or search on metacpan
0.05 Tue Nov 30 17:00:00 2010
- Patch from CPAN RT
0.03 Wed Nov 17 18:01:00 2004
- XHTML cleaned up
0.01 Fri Jul 4 07:39:00 2003
- original version; created by h2xs 1.21 with options
-X -n CGI::ProgressBar
view all matches for this distribution
view release on metacpan or search on metacpan
(or better still code) to add to the test module is welcome.
2000/01/25
Made all hand generated HTML in QuickForm XHTML compliant (but your version of
CGI.pm might not be).
Updated the examples to be XHTML compliant too.
2000/01/18
Alex Bransby-Williams pointed out that applying a style to buttons did not
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CGI/Template.pm view on Meta::CPAN
our $VERSION = '0.01';
# These variables just define standard HTML DOCTYPEs. We'll use them throughout.
$STRICT = qq{<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"\n"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\n\n};
$TRANSITIONAL = qq{<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"\n"http://www.w3.org/TR/html4/loose.dtd">\n\n};
$FRAMESET = qq{<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"\n"http://www.w3.org/TR/html4/frameset.dtd">\n\n};
$HTML5 = qq{<!DOCTYPE html>};
# Use HTML5 by default.
view all matches for this distribution
view release on metacpan or search on metacpan
$CGI::VERSION='4.68';
use CGI::Util qw(rearrange rearrange_header make_attributes unescape escape expires ebcdic2ascii ascii2ebcdic check_hash_param);
$_XHTML_DTD = ['-//W3C//DTD XHTML 1.0 Transitional//EN',
'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'];
{
local $^W = 0;
$TAINTED = substr("$0$^X",0,0);
@SAVED_SYMBOLS = ();
# >>>>> Here are some globals that you might want to adjust <<<<<<
sub initialize_globals {
# Set this to 1 to generate XTML-compatible output
$XHTML = 1;
# Change this to the preferred DTD to print in start_html()
# or use default_dtd('text of DTD to use');
$DEFAULT_DTD = [ '-//W3C//DTD HTML 4.01 Transitional//EN',
'http://www.w3.org/TR/html4/loose.dtd' ] ;
if ($tagname=~/start_(\w+)/i) {
return "<$1$attr>";
} elsif ($tagname=~/end_(\w+)/i) {
return "</$1>";
} else {
return $XHTML ? "<$tagname$attr />" : "<$tagname$attr>" unless @rest;
my($tag,$untag) = ("<$tagname$attr>","</$tagname>");
my @result = map { "$tag$_$untag" }
(ref($rest[0]) eq 'ARRAY') ? @{$rest[0]} : "@rest";
return "@result";
}
sub _selected {
my $self = shift;
my $value = shift;
return '' unless $value;
return $XHTML ? qq(selected="selected" ) : qq(selected );
}
sub _checked {
my $self = shift;
my $value = shift;
return '' unless $value;
return $XHTML ? qq(checked="checked" ) : qq(checked );
}
sub _reset_globals { initialize_globals(); }
sub _setup_symbols {
$dtd = $DEFAULT_DTD unless $dtd->[0] =~ m|^-//|;
} else {
$dtd = $DEFAULT_DTD unless $dtd =~ m|^-//|;
}
} else {
$dtd = $XHTML ? $_XHTML_DTD : $DEFAULT_DTD;
}
$xml_dtd++ if ref($dtd) eq 'ARRAY' && $dtd->[0] =~ /\bXHTML\b/i;
$xml_dtd++ if ref($dtd) eq '' && $dtd =~ /\bXHTML\b/i;
push @result,qq(<?xml version="1.0" encoding="$encoding"?>) if $xml_dtd && $declare_xml;
$title = $self->_maybe_escapeHTML($title || 'Untitled Document');
$author = $self->escape($author);
if ($DTD_PUBLIC_IDENTIFIER =~ /[^X]HTML (2\.0|3\.2|4\.01?)/i) {
$lang = "" unless defined $lang;
$XHTML = 0;
}
else {
$lang = 'en-US' unless defined $lang;
}
my $lang_bits = $lang ne '' ? qq( lang="$lang" xml:lang="$lang") : '';
my $meta_bits = qq(<meta http-equiv="Content-Type" content="text/html; charset=$encoding" />)
if $XHTML && $encoding && !$declare_xml;
push(@result,$XHTML ? qq(<html xmlns="http://www.w3.org/1999/xhtml"$lang_bits>\n<head>\n<title>$title</title>)
: ($lang ? qq(<html lang="$lang">) : "<html>")
. "<head><title>$title</title>");
if (defined $author) {
push(@result,$XHTML ? "<link rev=\"made\" href=\"mailto:$author\" />"
: "<link rev=\"made\" href=\"mailto:$author\">");
}
if ($base || $xbase || $target) {
my $href = $xbase || $self->url('-path'=>1);
my $t = $target ? qq/ target="$target"/ : '';
push(@result,$XHTML ? qq(<base href="$href"$t />) : qq(<base href="$href"$t>));
}
if ($meta && ref($meta) && (ref($meta) eq 'HASH')) {
for (sort keys %$meta) { push(@result,$XHTML ? qq(<meta name="$_" content="$meta->{$_}" />)
: qq(<meta name="$_" content="$meta->{$_}">)); }
}
my $meta_bits_set = 0;
if( $head ) {
my $type = 'text/css';
my $rel = 'stylesheet';
my $cdata_start = $XHTML ? "\n<!--/* <![CDATA[ */" : "\n<!-- ";
my $cdata_end = $XHTML ? "\n/* ]]> */-->\n" : " -->\n";
my @s = ref($style) eq 'ARRAY' ? @$style : $style;
my $other = '';
for my $s (@s) {
if (ref($src) eq "ARRAY") # Check to see if the $src variable is an array reference
{ # If it is, push a LINK tag for each one
for $src (@$src)
{
push(@result,$XHTML ? qq(<link rel="$rel" type="$type" href="$src" $other/>)
: qq(<link rel="$rel" type="$type" href="$src"$other>)) if $src;
}
}
else
{ # Otherwise, push the single -src, if it exists.
push(@result,$XHTML ? qq(<link rel="$rel" type="$type" href="$src" $other/>)
: qq(<link rel="$rel" type="$type" href="$src"$other>)
) if $src;
}
if ($verbatim) {
my @v = ref($verbatim) eq 'ARRAY' ? @$verbatim : $verbatim;
push(@result,style({'type'=>$type},"$cdata_start\n$_\n$cdata_end")) for @c;
}
} else {
my $src = $s;
push(@result,$XHTML ? qq(<link rel="$rel" type="$type" href="$src" $other/>)
: qq(<link rel="$rel" type="$type" href="$src"$other>));
}
}
@result;
}
sub isindex {
my($self,@p) = self_or_default(@_);
my($action,@other) = rearrange([ACTION],@p);
$action = qq/ action="$action"/ if $action;
my($other) = @other ? " @other" : '';
return $XHTML ? "<isindex$action$other />" : "<isindex$action$other>";
}
#### Method: start_form
# Start a form
# Parameters:
my($method,$action,$enctype,@other) =
rearrange([METHOD,ACTION,ENCTYPE],@p);
$method = $self->_maybe_escapeHTML(lc($method || 'post'));
if( $XHTML ){
$enctype = $self->_maybe_escapeHTML($enctype || &MULTIPART);
}else{
$enctype = $self->_maybe_escapeHTML($enctype || &URL_ENCODED);
}
my($other) = @other ? " @other" : '';
# this entered at cristy's request to fix problems with file upload fields
# and WebTV -- not sure it won't break stuff
my($value) = $current ne '' ? qq(value="$current") : '';
$tabindex = $self->element_tab($tabindex);
return $XHTML ? qq(<input type="$tag" name="$name" $tabindex$value$s$m$other />)
: qq(<input type="$tag" name="$name" $value$s$m$other>);
}
#### Method: textfield
# Parameters:
my($val) = '';
$val = qq/ value="$value"/ if $value;
$script = qq/ onclick="$script"/ if $script;
my($other) = @other ? " @other" : '';
$tabindex = $self->element_tab($tabindex);
return $XHTML ? qq(<input type="button" $tabindex$name$val$script$other />)
: qq(<input type="button"$name$val$script$other>);
}
#### Method: submit
# Create a "submit query" button.
$value = defined($value) ? $value : $label;
my $val = '';
$val = qq/value="$value" / if defined($value);
$tabindex = $self->element_tab($tabindex);
my($other) = @other ? "@other " : '';
return $XHTML ? qq(<input type="submit" $tabindex$name$val$other/>)
: qq(<input type="submit" $name$val$other>);
}
#### Method: reset
# Create a "reset" button.
$value = defined($value) ? $value : $label;
my($val) = '';
$val = qq/ value="$value"/ if defined($value);
my($other) = @other ? " @other" : '';
$tabindex = $self->element_tab($tabindex);
return $XHTML ? qq(<input type="reset" $tabindex$name$val$other />)
: qq(<input type="reset"$name$val$other>);
}
#### Method: defaults
# Create a "defaults" button.
$label=$self->_maybe_escapeHTML($label,1);
$label = $label || "Defaults";
my($value) = qq/ value="$label"/;
my($other) = @other ? " @other" : '';
$tabindex = $self->element_tab($tabindex);
return $XHTML ? qq(<input type="submit" name=".defaults" $tabindex$value$other />)
: qq/<input type="submit" NAME=".defaults"$value$other>/;
}
#### Method: comment
# Create an HTML <!-- comment -->
$value = $self->_maybe_escapeHTML($value,1);
$the_label = $self->_maybe_escapeHTML($the_label);
my($other) = @other ? "@other " : '';
$tabindex = $self->element_tab($tabindex);
$self->register_parameter($name);
return $XHTML ? CGI::label($labelattributes,
qq{<input type="checkbox" name="$name" value="$value" $tabindex$checked$other/>$the_label})
: qq{<input type="checkbox" name="$name" value="$value"$checked$other>$the_label};
}
# Escape HTML
my $checkit = $self->_checked($box_type eq 'radio' ? ($checked{$_} && !$radio_checked++)
: $checked{$_});
my($break);
if ($linebreak) {
$break = $XHTML ? "<br />" : "<br>";
}
else {
$break = '';
}
my($label)='';
$name = q{} if ! defined $name;
$result = qq/<select name="$name" $tabindex$other>\n/;
for (@values) {
if (/<optgroup/) {
for my $v (split(/\n/)) {
my $selectit = $XHTML ? 'selected="selected"' : 'selected';
for my $selected (sort keys %selected) {
$v =~ s/(value="\Q$selected\E")/$selectit $1/;
}
$result .= "$v\n";
}
$name = $self->_maybe_escapeHTML($name) || q{};
$result = qq/<optgroup label="$name"$other>\n/;
for (@values) {
if (/<optgroup/) {
for (split(/\n/)) {
my $selectit = $XHTML ? 'selected="selected"' : 'selected';
s/(value="$selected")/$selectit $1/ if defined $selected;
$result .= "$_\n";
}
}
else {
$tabindex = $self->element_tab($tabindex);
$result = qq/<select name="$name" $tabindex$has_size$is_multiple$other>\n/;
for (@values) {
if (/<optgroup/) {
for my $v (split(/\n/)) {
my $selectit = $XHTML ? 'selected="selected"' : 'selected';
for my $selected (sort keys %selected) {
$v =~ s/(value="$selected")/$selectit $1/;
}
$result .= "$v\n";
}
@value = @prev if !$do_override && @prev;
$name=$self->_maybe_escapeHTML($name);
for (@value) {
$_ = defined($_) ? $self->_maybe_escapeHTML($_,1) : '';
push @result,$XHTML ? qq(<input type="hidden" name="$name" value="$_" @other />)
: qq(<input type="hidden" name="$name" value="$_" @other>);
}
return wantarray ? @result : join('',@result);
}
rearrange([NAME,SRC,ALIGN],@p);
my($align) = $alignment ? " align=\L\"$alignment\"" : '';
my($other) = @other ? " @other" : '';
$name=$self->_maybe_escapeHTML($name);
return $XHTML ? qq(<input type="image" name="$name" src="$src"$align$other />)
: qq/<input type="image" name="$name" src="$src"$align$other>/;
}
#### Method: self_url
# Returns a URL containing the current script and all its
view all matches for this distribution