[Mono-aspnet-list] mono can't create valid XHTML 1.0 Strict?
fyndor
fyndor at gmail.com
Sun Mar 15 23:34:22 EDT 2009
I started using Mono & ASP.NET today. I downloaded the openSuse VMWare
virtual machine, updated everything installed and started playing around.
I create a new C# ASP.NET Web Application solution compile and run. I right
click on the page that was created from the code and get source (in
Firefox). I paste that source in to the W3C validator and it fails on 2
counts. The first is the <html> tag needs to be changed to <html
xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> which is no
big deal. The second error is the real problem. "document type does not
allow element "input" here; missing one of "p", "h1", "h2", "h3", "h4",
"h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag." on
line that has the submit button. I did not modify this code at all from
what MonoDevelop starts with when i tell it i want a C# ASP.NET solution.
Like I said the first part is no big deal because I can modify the code to
get it to standard, but I don't know how to modify the code to fix the
second error. The W3C solution was to change it from strict to transitional
:,( The page functions fine, but I am a bit anal and don't like the idea of
writing code that I can't make meet the standard. Is this a Mono problem or
.NET in general?
Here is the HTML it created.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>Default</title>
</head>
<body>
<form method="post" action="Default.aspx" id="form1">
<script type="text/javascript">
//<![CDATA[
var theForm;
if (document.getElementById) { theForm = document.getElementById ('form1');
}
else { theForm = document.form1; }
//]]>
</script>
<div>
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="DAAAAA=="
/>
</div>
<input type="submit" name="button1" value="Click me!" id="button1" />
<div>
<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION"
value="GwABAAAA/////wEAAAAAAAAADwEAAAABAAAACD+/Yg4LAA==" />
</div></form>
</body>
</html>
--
View this message in context: http://www.nabble.com/mono-can%27t-create-valid-XHTML-1.0-Strict--tp22531459p22531459.html
Sent from the Mono - ASP.NET mailing list archive at Nabble.com.
More information about the Mono-aspnet-list
mailing list