This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 3448 - nested tags should be flaged as invalid
Summary: nested tags should be flaged as invalid
Status: RESOLVED LATER
Alias: None
Product: Validator
Classification: Unclassified
Component: check (show other bugs)
Version: HEAD
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Terje Bless
QA Contact: qa-dev tracking
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-12 23:27 UTC by Ervin
Modified: 2006-07-21 02:26 UTC (History)
0 users

See Also:


Attachments

Description Ervin 2006-07-12 23:27:05 UTC
Overview Description:
According to http://www.w3.org/TR/2002/REC-xhtml1-20020801/#prohibitions
a form tag cannot be a descendant of another form tag
However, a nested form validates correctly.

Steps to Reproduce:

Validate this test case:
====================
<!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">
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<title>TITLE</title>
</head>
<body>
<form id="f1" action="/action0">
<div><form  id="f2" action="/action1"><div>hello 1</div></form></div>
</form>
</body>
</html>
==================

Actual Results:
Passed validation

Expected Results:
Failed validation, 1 error

Build & Date
Markup Validation Service v0.7.2 on 2006-07-12
Comment 1 Olivier Thereaux 2006-07-21 02:26:21 UTC
The nesting scenario you describe is indeed non conformant (as explained in http://www.w3.org/TR/xhtml1/#prohibitions ) but if you look at http://www.w3.org/TR/xhtml1/#h-4.9 in the XHTML specification, you will see an explanation of why constraints regarding *any* nesting depth cannot be expressed in the formal grammar (DTD) used by XHTML 1.0, and therefore it can not be (in)validated.

I am setting this issue as "Later", knowing that this is the job for a conformance checker, not a mere validator.