问题
I have a plain html file like this:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<frameset rows="*">
<frame name="inner" src="inner.htm" />
</frameset>
</html>
In visual studio 2010 I get warnings "(XHTML 1.0 Transitional): Element 'body' occurs too few times" and "(XHTML 1.0 Transitional): Element 'frameset' is not supported.". However the w3c validator says it is OK. Can someone point out what I am doing wrong?
回答1:
If you get a warning saying "Validation (XHTML 1.0 Transitional)..." you are testing against XHTML Transitional instead of XHTML Frameset.
Solution: switch the target schema to XHTML Frameset.
When I do so, I get only a single warning: "Attribute 'name' is considered outdated. A newer construct is recommended."
来源:https://stackoverflow.com/questions/17090902/element-frameset-is-not-supported-from-visual-studio-2010