The following comment has been added to this issue:
Author: Robert van Loenhout
Created: Wed, 22 Sep 2004 2:08 AM
Body:
I wanted to make this bug more clear.
Outputting elements such as textarea without contents as <textarea .../> is NOT XHTML
valid.
Even though the W3C validator seems to accept it, the XHTML 1.0 standard declares:
All elements other than those declared in the DTD as EMPTY must have an end tag.
Elements that are declared in the DTD as EMPTY can have an end tag or can use empty
element shorthand
http://www.w3.org/TR/xhtml1/#h-4.3
Internet Explorer, but also Mozilla and Firefox wil not be able to render such
documents.
This is clear in a document that includes <textarea/>.
Also <a name="123"/> and CSS to change the style op anchor tags, will give problems.
---------------------------------------------------------------------
View this comment:
http://issues.apache.org/jira/browse/XALANJ-1906?page=comments#action_53312
---------------------------------------------------------------------
View the issue:
http://issues.apache.org/jira/browse/XALANJ-1906
Here is an overview of the issue:
---------------------------------------------------------------------
Key: XALANJ-1906
Summary: [xhtml output] Empty element form for non EMPTY declared elements
Type: Bug
Status: Unassigned
Priority: Blocker
Project: XalanJ2
Components:
Serialization
Versions:
2.0.0
Assignee:
Reporter: Marco
Created: Fri, 9 Jul 2004 5:32 PM
Updated: Wed, 22 Sep 2004 2:08 AM
Environment: Operating System: All
Platform: All
Description:
- The stylesheet:
> <?xml version="1.0" encoding="UTF-8"?>
>
> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
>
> <xsl:output method="xml" version="1.0" encoding="iso-8859-1" indent="yes"
> omit-xml-declaration="no" doctype-public="-//W3C//DTD XHTML 1.0
Strict//EN"
> doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" />
>
> <xsl:template match="/">
> <html>
> <head>
> <title>bug test</title>
> </head>
> <body>
> <div></div>
> </body>
> </html>
> </xsl:template>
>
> </xsl:stylesheet>
- The output:
> <?xml version="1.0" encoding="iso-8859-1"?>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
> <html>
> <head>
> <title>bug test</title>
> </head>
> <body>
> <div />
> </body>
> </html>
- The standards:
> Empty-element tags MAY be used for any element which has no content,
> whether or not it is declared using the keyword EMPTY.
> For interoperability, the empty-element tag SHOULD be used, and
> SHOULD only be used, for elements which are declared EMPTY.
(http://www.w3.org/TR/REC-xml/#sec-starttags)
> 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 />).
(http://www.w3.org/TR/xhtml1/#guidelines)
- The patch:
Elements like <p> or <div> aren't declared as EMPTY in the XHTML DTD.
According to XML and XHTML standards, the <div></div> form should be used
instead of <div/>. Both are XML (and XHTML) valid, but the second leads to
strange problems with some browsers (guess who --- IE).
Hope this helps,
Marco
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]