You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2009/01/23 14:18:07 UTC

svn commit: r737019 - in /lenya/trunk/src/webapp/lenya: config/sitemap/serializers.xmap xslt/cforms/add-xhtml-namespace.xsl

Author: andreas
Date: Fri Jan 23 05:18:07 2009
New Revision: 737019

URL: http://svn.apache.org/viewvc?rev=737019&view=rev
Log:
Use XHTMLSerializer from serializers block (fixes issue of collapsing <textarea/> elements), remove space workaround for textareas.

Modified:
    lenya/trunk/src/webapp/lenya/config/sitemap/serializers.xmap
    lenya/trunk/src/webapp/lenya/xslt/cforms/add-xhtml-namespace.xsl

Modified: lenya/trunk/src/webapp/lenya/config/sitemap/serializers.xmap
URL: http://svn.apache.org/viewvc/lenya/trunk/src/webapp/lenya/config/sitemap/serializers.xmap?rev=737019&r1=737018&r2=737019&view=diff
==============================================================================
--- lenya/trunk/src/webapp/lenya/config/sitemap/serializers.xmap (original)
+++ lenya/trunk/src/webapp/lenya/config/sitemap/serializers.xmap Fri Jan 23 05:18:07 2009
@@ -44,9 +44,8 @@
       <encoding>UTF-8</encoding>
     </map:serializer>
     
-    <map:serializer name="xhtml" src="org.apache.cocoon.serialization.XMLSerializer" mime-type="text/html; charset=utf-8" logger="sitemap.serializer.xhtml" pool-grow="2" pool-max="64" pool-min="2"> 
-      <doctype-public>-//W3C//DTD XHTML 1.0 Strict//EN</doctype-public>
-      <doctype-system>http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd</doctype-system>
+    <map:serializer name="xhtml" src="org.apache.cocoon.components.serializers.XHTMLSerializer" mime-type="text/html; charset=utf-8" logger="sitemap.serializer.xhtml" pool-grow="2" pool-max="64" pool-min="2"> 
+      <doctype-default>strict</doctype-default>
       <encoding>UTF-8</encoding>
     </map:serializer>
     

Modified: lenya/trunk/src/webapp/lenya/xslt/cforms/add-xhtml-namespace.xsl
URL: http://svn.apache.org/viewvc/lenya/trunk/src/webapp/lenya/xslt/cforms/add-xhtml-namespace.xsl?rev=737019&r1=737018&r2=737019&view=diff
==============================================================================
--- lenya/trunk/src/webapp/lenya/xslt/cforms/add-xhtml-namespace.xsl (original)
+++ lenya/trunk/src/webapp/lenya/xslt/cforms/add-xhtml-namespace.xsl Fri Jan 23 05:18:07 2009
@@ -6,9 +6,9 @@
   The ASF licenses this file to You under the Apache License, Version 2.0
   (the "License"); you may not use this file except in compliance with
   the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
+  
+  http://www.apache.org/licenses/LICENSE-2.0
+  
   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -17,33 +17,32 @@
 -->
 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
   xmlns:xhtml="http://www.w3.org/1999/xhtml">
-
+  
   <xsl:template match="*[namespace-uri()='']">
     <xsl:element name="{local-name()}" namespace="http://www.w3.org/1999/xhtml">
       <xsl:apply-templates select="@*|node()|text()"/>
     </xsl:element>
   </xsl:template>
   
-    <!--
+  <!--
     Workaround to prevent the serializer from collapsing these
     elements, since browsers currently can not handle things like
-      <textarea/>
+    <textarea/>
     The XHTML serializer currently used by Lenya can not be
     configured to avoid this collapsing; as long as that is the case
     this workaround is needed.
-    -->  
+  -->  
   <xsl:template match="node()[local-name() = 'textarea' or local-name() = 'script' or local-name() = 'style']">
-   <xsl:element name="{local-name()}" namespace="http://www.w3.org/1999/xhtml">
+    <xsl:element name="{local-name()}" namespace="http://www.w3.org/1999/xhtml">
       <xsl:copy-of select="@*"/>
       <xsl:apply-templates/>
-	  <xsl:if test="string-length(.) = 0"><xsl:text> </xsl:text></xsl:if>
     </xsl:element>
   </xsl:template>
-
+  
   <xsl:template match="@*|node()">
     <xsl:copy>
       <xsl:apply-templates select="@*|node()"/>
     </xsl:copy>
   </xsl:template>
-
+  
 </xsl:stylesheet>



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org