You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by "Eric Meyer (JIRA)" <ji...@apache.org> on 2006/04/21 22:11:05 UTC
[jira] Created: (COCOON-1839) exception2html.xslt causes
IE display problem
exception2html.xslt <script /> causes IE display problem
--------------------------------------------------------
Key: COCOON-1839
URL: http://issues.apache.org/jira/browse/COCOON-1839
Project: Cocoon
Type: Bug
Components: * Cocoon Core
Versions: 2.1.9
Reporter: Eric Meyer
Priority: Minor
Attachments: exception2xhtml-patch.txt
The IE rendering engine will show a blank page if the document contains a minimal (self-closing) <script /> tag.
By putting in an nbsp ( ) or a new line, the XSLT produces <script> </script>, which then allows IE to properly display the page.
The attached page (license granted to asf) adds a non-breaking space to keep the tag from being collapsed.
<script src="{$contextPath}/scripts/main.js" type="text/javascript">
 
</script>
--
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
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (COCOON-1839) exception2html.xslt
causes IE display problem
Posted by "Eric Meyer (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/COCOON-1839?page=comments#action_12376019 ]
Eric Meyer commented on COCOON-1839:
------------------------------------
This problem goes away when I use the right serializer (or at least what I think is the right one - see below)
<map:serializer name="oacs-xhtml11"
src="org.apache.cocoon.serialization.HTMLSerializer"
logger="sitemap.serializer.xhtml"
mime-type="text/html; charset=utf-8" pool-grow="4"
pool-max="200" pool-min="4">
<doctype-public>-//W3C//DTD XHTML 1.1//EN</doctype-public>
<doctype-system>
http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd
</doctype-system>
<encoding>UTF-8</encoding>
<omit-xml-declaration>yes</omit-xml-declaration>
</map:serializer>
Note that it is confusing that there are so many different html/xhtml serialization options, some named the same but in different packages with different behaviors.
org.apache.cocoon.components.serializers.HTMLSerialzer
org.apache.cocoon.serialization.HTMLSerializer
org.apache.cocoon.components.serializers.XHTMLSerialzer
org.apache.cocoon..components.serializers.XMLSerializer
org.apache.cocoon..components.sax.XMLSerializer
org.apache.cocoon.serialization.XMLSerializer
For example, I tried the org.apache.cocoon.components.serializers.XHTMLSerialzer, but that escapes quotes inside attributes and script elements - breaking the javascript in IE.
Regards,
Eric Meyer
> exception2html.xslt <script /> causes IE display problem
> --------------------------------------------------------
>
> Key: COCOON-1839
> URL: http://issues.apache.org/jira/browse/COCOON-1839
> Project: Cocoon
> Type: Bug
> Components: * Cocoon Core
> Versions: 2.1.9
> Reporter: Eric Meyer
> Priority: Minor
> Attachments: exception2xhtml-patch.txt
>
> The IE rendering engine will show a blank page if the document contains a minimal (self-closing) <script /> tag.
> By putting in an nbsp ( ) or a new line, the XSLT produces <script> </script>, which then allows IE to properly display the page.
> The attached page (license granted to asf) adds a non-breaking space to keep the tag from being collapsed.
> <script src="{$contextPath}/scripts/main.js" type="text/javascript">
>  
> </script>
--
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
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (COCOON-1839) exception2html.xslt
causes IE display problem
Posted by "Eric Meyer (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/COCOON-1839?page=comments#action_12375788 ]
Eric Meyer commented on COCOON-1839:
------------------------------------
You are correct. I am using the xml serializer. However, it does not appear possible to use the xhtml serializer with the xhtml1.1 doctype (though it does look like I could subclass it, and override the configure method).
<map:serializer name="oacs-xhtml11"
src="org.apache.cocoon.serialization.XMLSerializer"
logger="sitemap.serializer.xhtml"
mime-type="text/html; charset=utf-8" pool-grow="4"
pool-max="200" pool-min="4">
<doctype-public>-//W3C//DTD XHTML 1.1//EN</doctype-public>
<doctype-system>
http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd
</doctype-system>
<encoding>UTF-8</encoding>
<omit-xml-declaration>yes</omit-xml-declaration>
</map:serializer>
> exception2html.xslt <script /> causes IE display problem
> --------------------------------------------------------
>
> Key: COCOON-1839
> URL: http://issues.apache.org/jira/browse/COCOON-1839
> Project: Cocoon
> Type: Bug
> Components: * Cocoon Core
> Versions: 2.1.9
> Reporter: Eric Meyer
> Priority: Minor
> Attachments: exception2xhtml-patch.txt
>
> The IE rendering engine will show a blank page if the document contains a minimal (self-closing) <script /> tag.
> By putting in an nbsp ( ) or a new line, the XSLT produces <script> </script>, which then allows IE to properly display the page.
> The attached page (license granted to asf) adds a non-breaking space to keep the tag from being collapsed.
> <script src="{$contextPath}/scripts/main.js" type="text/javascript">
>  
> </script>
--
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
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (COCOON-1839) exception2html.xslt
causes IE display problem
Posted by "Eric Meyer (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/COCOON-1839?page=comments#action_12375630 ]
Eric Meyer commented on COCOON-1839:
------------------------------------
Actually, a new-line isn't sufficient.   does work, though.
> exception2html.xslt <script /> causes IE display problem
> --------------------------------------------------------
>
> Key: COCOON-1839
> URL: http://issues.apache.org/jira/browse/COCOON-1839
> Project: Cocoon
> Type: Bug
> Components: * Cocoon Core
> Versions: 2.1.9
> Reporter: Eric Meyer
> Priority: Minor
> Attachments: exception2xhtml-patch.txt
>
> The IE rendering engine will show a blank page if the document contains a minimal (self-closing) <script /> tag.
> By putting in an nbsp ( ) or a new line, the XSLT produces <script> </script>, which then allows IE to properly display the page.
> The attached page (license granted to asf) adds a non-breaking space to keep the tag from being collapsed.
> <script src="{$contextPath}/scripts/main.js" type="text/javascript">
>  
> </script>
--
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
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Assigned: (COCOON-1839) exception2html.xslt
causes IE display problem
Posted by "Antonio Gallardo (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/COCOON-1839?page=all ]
Antonio Gallardo reassigned COCOON-1839:
----------------------------------------
Assign To: Antonio Gallardo
> exception2html.xslt <script /> causes IE display problem
> --------------------------------------------------------
>
> Key: COCOON-1839
> URL: http://issues.apache.org/jira/browse/COCOON-1839
> Project: Cocoon
> Type: Bug
> Components: * Cocoon Core
> Versions: 2.1.9
> Reporter: Eric Meyer
> Assignee: Antonio Gallardo
> Priority: Minor
> Attachments: exception2xhtml-patch.txt
>
> The IE rendering engine will show a blank page if the document contains a minimal (self-closing) <script /> tag.
> By putting in an nbsp ( ) or a new line, the XSLT produces <script> </script>, which then allows IE to properly display the page.
> The attached page (license granted to asf) adds a non-breaking space to keep the tag from being collapsed.
> <script src="{$contextPath}/scripts/main.js" type="text/javascript">
>  
> </script>
--
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
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Closed: (COCOON-1839) exception2html.xslt causes
IE display problem
Posted by "Antonio Gallardo (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/COCOON-1839?page=all ]
Antonio Gallardo closed COCOON-1839:
------------------------------------
Fix Version: 2.2-dev (Current SVN)
2.1.10-dev (current SVN)
Resolution: Fixed
Thanks for the patch. Patch applied in 2.1.10-dev and 2.2-dev. Feel free to reopen if needed.
> exception2html.xslt <script /> causes IE display problem
> --------------------------------------------------------
>
> Key: COCOON-1839
> URL: http://issues.apache.org/jira/browse/COCOON-1839
> Project: Cocoon
> Type: Bug
> Components: * Cocoon Core
> Versions: 2.1.9
> Reporter: Eric Meyer
> Assignee: Antonio Gallardo
> Priority: Minor
> Fix For: 2.2-dev (Current SVN), 2.1.10-dev (current SVN)
> Attachments: exception2xhtml-patch.txt
>
> The IE rendering engine will show a blank page if the document contains a minimal (self-closing) <script /> tag.
> By putting in an nbsp ( ) or a new line, the XSLT produces <script> </script>, which then allows IE to properly display the page.
> The attached page (license granted to asf) adds a non-breaking space to keep the tag from being collapsed.
> <script src="{$contextPath}/scripts/main.js" type="text/javascript">
>  
> </script>
--
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
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (COCOON-1839) exception2html.xslt
causes IE display problem
Posted by "Antonio Gallardo (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/COCOON-1839?page=comments#action_12375696 ]
Antonio Gallardo commented on COCOON-1839:
------------------------------------------
FYI, <script></script> is a a properly serialized tag. The problem is the well know bug in the IE rendering engine as Eric pointed out. I prefer Eric fix, because a "blank" character is better than an empty instruction.
> exception2html.xslt <script /> causes IE display problem
> --------------------------------------------------------
>
> Key: COCOON-1839
> URL: http://issues.apache.org/jira/browse/COCOON-1839
> Project: Cocoon
> Type: Bug
> Components: * Cocoon Core
> Versions: 2.1.9
> Reporter: Eric Meyer
> Priority: Minor
> Attachments: exception2xhtml-patch.txt
>
> The IE rendering engine will show a blank page if the document contains a minimal (self-closing) <script /> tag.
> By putting in an nbsp ( ) or a new line, the XSLT produces <script> </script>, which then allows IE to properly display the page.
> The attached page (license granted to asf) adds a non-breaking space to keep the tag from being collapsed.
> <script src="{$contextPath}/scripts/main.js" type="text/javascript">
>  
> </script>
--
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
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (COCOON-1839) exception2html.xslt
causes IE display problem
Posted by "Vadim Gritsenko (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/COCOON-1839?page=comments#action_12376530 ]
Vadim Gritsenko commented on COCOON-1839:
-----------------------------------------
Eric,
Above serializer declaration (oacs-xhtml11) is not valid, even if it works. It is not either HTML nor XHTML. For XHTML, you have to use XMLSerializer, since XHTML is an XML, and you have to use correct XHTML mime type [1]. For HTML, you have to use HTML's document type, not XHTML's.
Vadim
[1] http://www.w3.org/TR/xhtml-media-types/
> exception2html.xslt <script /> causes IE display problem
> --------------------------------------------------------
>
> Key: COCOON-1839
> URL: http://issues.apache.org/jira/browse/COCOON-1839
> Project: Cocoon
> Type: Bug
> Components: * Cocoon Core
> Versions: 2.1.9
> Reporter: Eric Meyer
> Priority: Minor
> Attachments: exception2xhtml-patch.txt
>
> The IE rendering engine will show a blank page if the document contains a minimal (self-closing) <script /> tag.
> By putting in an nbsp ( ) or a new line, the XSLT produces <script> </script>, which then allows IE to properly display the page.
> The attached page (license granted to asf) adds a non-breaking space to keep the tag from being collapsed.
> <script src="{$contextPath}/scripts/main.js" type="text/javascript">
>  
> </script>
--
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
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (COCOON-1839) exception2html.xslt
causes IE display problem
Posted by "Eric Meyer (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/COCOON-1839?page=comments#action_12376533 ]
Eric Meyer commented on COCOON-1839:
------------------------------------
Hi Vadim,
Good point. So - back to the original issue in this thread: exception2html.xslt does not work properly when used to produce xhtml using the xml serializer.
Regards,
Eric
> exception2html.xslt <script /> causes IE display problem
> --------------------------------------------------------
>
> Key: COCOON-1839
> URL: http://issues.apache.org/jira/browse/COCOON-1839
> Project: Cocoon
> Type: Bug
> Components: * Cocoon Core
> Versions: 2.1.9
> Reporter: Eric Meyer
> Priority: Minor
> Attachments: exception2xhtml-patch.txt
>
> The IE rendering engine will show a blank page if the document contains a minimal (self-closing) <script /> tag.
> By putting in an nbsp ( ) or a new line, the XSLT produces <script> </script>, which then allows IE to properly display the page.
> The attached page (license granted to asf) adds a non-breaking space to keep the tag from being collapsed.
> <script src="{$contextPath}/scripts/main.js" type="text/javascript">
>  
> </script>
--
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
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (COCOON-1839) exception2html.xslt
causes IE display problem
Posted by "Antonio Gallardo (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/COCOON-1839?page=comments#action_12375697 ]
Antonio Gallardo commented on COCOON-1839:
------------------------------------------
Eric, would you try to move <script> right after the title? IMHO, it should work. Something like:
<head>
<title>....</title>
<script src="{$contextPath}/scripts/main.js" type="text/javascript"/>
......
</head>
Just let me know if this woks and I will commit the fix. Many thanks in advance.
> exception2html.xslt <script /> causes IE display problem
> --------------------------------------------------------
>
> Key: COCOON-1839
> URL: http://issues.apache.org/jira/browse/COCOON-1839
> Project: Cocoon
> Type: Bug
> Components: * Cocoon Core
> Versions: 2.1.9
> Reporter: Eric Meyer
> Priority: Minor
> Attachments: exception2xhtml-patch.txt
>
> The IE rendering engine will show a blank page if the document contains a minimal (self-closing) <script /> tag.
> By putting in an nbsp ( ) or a new line, the XSLT produces <script> </script>, which then allows IE to properly display the page.
> The attached page (license granted to asf) adds a non-breaking space to keep the tag from being collapsed.
> <script src="{$contextPath}/scripts/main.js" type="text/javascript">
>  
> </script>
--
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
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (COCOON-1839) exception2html.xslt
causes IE display problem
Posted by "Vadim Gritsenko (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/COCOON-1839?page=comments#action_12376532 ]
Vadim Gritsenko commented on COCOON-1839:
-----------------------------------------
PS Serializers from org.apache.cocoon.serialization package are "standard",
core" Cocoon serializers. Those from org.apache.cocoon..components.serializers package are part of the optional serialization block, and are "optional", "advanced" serializers.
> exception2html.xslt <script /> causes IE display problem
> --------------------------------------------------------
>
> Key: COCOON-1839
> URL: http://issues.apache.org/jira/browse/COCOON-1839
> Project: Cocoon
> Type: Bug
> Components: * Cocoon Core
> Versions: 2.1.9
> Reporter: Eric Meyer
> Priority: Minor
> Attachments: exception2xhtml-patch.txt
>
> The IE rendering engine will show a blank page if the document contains a minimal (self-closing) <script /> tag.
> By putting in an nbsp ( ) or a new line, the XSLT produces <script> </script>, which then allows IE to properly display the page.
> The attached page (license granted to asf) adds a non-breaking space to keep the tag from being collapsed.
> <script src="{$contextPath}/scripts/main.js" type="text/javascript">
>  
> </script>
--
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
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (COCOON-1839) exception2html.xslt
causes IE display problem
Posted by "Jean-Baptiste Quenot (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/COCOON-1839?page=comments#action_12375676 ]
Jean-Baptiste Quenot commented on COCOON-1839:
----------------------------------------------
A JavaScript line terminator ";" would be actually more accurate. But the real problem is in the serializer. As we are using the "html" serializer, it should take care of properly serializing the <script></script> tag. If we fix the problem in exception2html.xslt, we will likely have to fix it in a lot more files as well.
> exception2html.xslt <script /> causes IE display problem
> --------------------------------------------------------
>
> Key: COCOON-1839
> URL: http://issues.apache.org/jira/browse/COCOON-1839
> Project: Cocoon
> Type: Bug
> Components: * Cocoon Core
> Versions: 2.1.9
> Reporter: Eric Meyer
> Priority: Minor
> Attachments: exception2xhtml-patch.txt
>
> The IE rendering engine will show a blank page if the document contains a minimal (self-closing) <script /> tag.
> By putting in an nbsp ( ) or a new line, the XSLT produces <script> </script>, which then allows IE to properly display the page.
> The attached page (license granted to asf) adds a non-breaking space to keep the tag from being collapsed.
> <script src="{$contextPath}/scripts/main.js" type="text/javascript">
>  
> </script>
--
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
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira