tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 49745] New: Element Minimization and Empty Element Content
Date Thu, 12 Aug 2010 13:34:32 GMT

           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

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:

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
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><%-- any comment --%></x:foo>
While the following are all non-empty tags:
<foo> </foo>
<foo><%= expression %></foo>
<foo><% scriptlet %></foo>
<foo><!-- a comment --></foo>

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message