in reply to Re: XML tags using perl CGI
in thread XML tags using perl CGI
And results:#maybe the next two lines can be combined -- I am not sure use CGI::Carp qw(fatalsToBrowser); use CGI qw/:standard :html2/; #the standard also says if I set :html2, xhtml will go away (but it do +esn't seem to have an effect). #no idea how to set -dtd attributes my $query = CGI->new; print $query->start_html(-title=>'Argh!', -background=>"../images/$SiteName.background.jpg", -link=>'brown', -vlink=>'#8b4513', -no_xhtml=>1, #this has no effect... -dtd=>'3.2 DTD' #this does the trick, but not listed in the standa +rd as to how to set it -- I hope this is right... }
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
Error Line 4 column 12: there is no attribute "XMLNS". <html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-U +S"><head> You have used the attribute named above in your document, but the docu +ment type you are using does not support that attribute for this elem +ent. This error is often caused by incorrect use of the "Strict" docu +ment type with a document that uses frames (e.g. you must use the "Tr +ansitional" document type to get the "target" attribute), or by using + vendor proprietary extensions such as "marginheight" (this is usuall +y fixed by using CSS to achieve the desired effect instead). This error may also result if the element itself is not supported in t +he document type you are using, as an undefined element will have no +supported attributes; in this case, see the element-undefined error m +essage for further information. How to fix: check the spelling and case of the element and attribute, +(Remember XHTML is all lower-case) and/or check that they are both al +lowed in the chosen document type, and/or use CSS instead of this att +ribute. Error Line 4 column 65: there is no attribute "XML:LANG". Error Line 7 column 93: document type does not allow element "META" he +re. The element named above was found in a context where it is not allowed +. This could mean that you have incorrectly nested elements -- such a +s a "style" element in the "body" section instead of inside "head" -- + or two elements that overlap (which is not allowed). One common cause for this error is the use of XHTML syntax in HTML doc +uments. Due to HTML's rules of implicitly closed elements, this error + can create cascading effects. For instance, using XHTML's "self-clos +ing" tags for "meta" and "link" in the "head" section of a HTML docum +ent may cause the parser to infer the end of the "head" section and t +he beginning of the "body" section (where "link" and "meta" are not a +llowed; hence the reported error).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: XML tags using perl CGI
by davorg (Chancellor) on Feb 06, 2007 at 12:11 UTC | |
by pmcaveman (Novice) on Feb 06, 2007 at 12:35 UTC | |
by Joost (Canon) on Feb 06, 2007 at 13:09 UTC | |
by Bod (Parson) on Jan 14, 2024 at 00:34 UTC | |
by pryrt (Abbot) on Jan 14, 2024 at 17:17 UTC | |
| |
by Anonymous Monk on Jan 14, 2024 at 11:53 UTC | |
by davorg (Chancellor) on Feb 06, 2007 at 13:15 UTC | |
by pmcaveman (Novice) on Feb 06, 2007 at 13:48 UTC | |
by davorg (Chancellor) on Feb 06, 2007 at 14:04 UTC |