https://issues.apache.org/bugzilla/show_bug.cgi?id=49745
Summary: Element Minimization and Empty Element Content
Product: Tomcat 6
Version: 6.0.28
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P2
Component: Servlet & JSP API
AssignedTo: [email protected]
ReportedBy: [email protected]
If you write <title> </title> with empty space in between, inside JSP(X)
Document (XML syntax)
tomcat translates this into (X)HTML output <title/>
IMHO this is incorrect behavior and output shoudl not be self closing tag
<title/> but
<title></title> if not <title> </title>.
-------------------------------------
Please consider these specs:
http://www.w3.org/TR/xhtml1/#C_3
C.3. Element Minimization and Empty Element Content
Given an empty instance of an element whose content model is not EMPTY (for
example, an empty title or paragraph) do not use the minimized form (e.g. use
<p> </p> and not <p />).
also this:
C.2. Empty Elements
Include a space before the trailing / and > of empty elements, e.g. <br />, <hr
/> and <img src="karen.jpg" alt="Karen" />. Also, use the minimized tag syntax
for empty elements, e.g. <br />, as the alternative syntax <br></br> allowed by
XML gives uncertain results in many existing user agents.
and also this:
JSP.1.3.4 Empty Elements
As examples, the following are all empty tags:
<x:foo></x:foo>
<x:foo />
<x:foo/>
<x:foo><%-- any comment --%></x:foo>
While the following are all non-empty tags:
<foo> </foo>
<foo><%= expression %></foo>
<foo><% scriptlet %></foo>
<foo><bar/></foo>
<foo><!-- a comment --></foo>
---------------
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]