cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anathan...@apache.org
Subject svn commit: r393428 - in /cocoon/trunk: blocks/cocoon-xsp/cocoon-xsp-impl/src/main/java/org/apache/cocoon/components/language/markup/xsp/java/xsp.xsl commons/status.xml
Date Wed, 12 Apr 2006 10:24:26 GMT
Author: anathaniel
Date: Wed Apr 12 03:24:22 2006
New Revision: 393428

URL: http://svn.apache.org/viewcvs?rev=393428&view=rev
Log:
XSP block: Use private methods to call start/endElement in xsp.xsl.
That generates smaller bytecode allowing to compiler larger XSPs before hitting the
64k limit for the size of the generate() method.

Modified:
    cocoon/trunk/blocks/cocoon-xsp/cocoon-xsp-impl/src/main/java/org/apache/cocoon/components/language/markup/xsp/java/xsp.xsl
    cocoon/trunk/commons/status.xml

Modified: cocoon/trunk/blocks/cocoon-xsp/cocoon-xsp-impl/src/main/java/org/apache/cocoon/components/language/markup/xsp/java/xsp.xsl
URL: http://svn.apache.org/viewcvs/cocoon/trunk/blocks/cocoon-xsp/cocoon-xsp-impl/src/main/java/org/apache/cocoon/components/language/markup/xsp/java/xsp.xsl?rev=393428&r1=393427&r2=393428&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-xsp/cocoon-xsp-impl/src/main/java/org/apache/cocoon/components/language/markup/xsp/java/xsp.xsl
(original)
+++ cocoon/trunk/blocks/cocoon-xsp/cocoon-xsp-impl/src/main/java/org/apache/cocoon/components/language/markup/xsp/java/xsp.xsl
Wed Apr 12 03:24:22 2006
@@ -117,6 +117,15 @@
         // Internally used list of attributes for SAX events.  Being on
         // class scope allows xsp:logic to define markup generating methods.
         private final AttributesImpl _xspAttr = new AttributesImpl();
+      
+        private void _startElem(String namespace, String localname, String name) throws SAXException
{
+            this.contentHandler.startElement(namespace, localname, name, _xspAttr);
+            _xspAttr.clear();
+        }
+
+        private void _endElem(String namespace, String localname, String name) throws SAXException
{
+            this.contentHandler.endElement(namespace, localname, name);
+        }
 
         /* Built-in parameters available for use */
         // context    - org.apache.cocoon.environment.Context
@@ -128,7 +137,7 @@
 
         /* User Class Declarations */
         <xsl:apply-templates select="xsp:logic"/>
-
+      
         /**
          * Generate XML data.
          */
@@ -457,20 +466,18 @@
 
     <xsl:apply-templates select="xsp:attribute | xsp:logic[xsp:attribute]"/>
 
-    this.contentHandler.startElement(
+    _startElem(
       "<xsl:value-of select="namespace-uri(.)"/>",
       "<xsl:value-of select="local-name(.)"/>",
-      "<xsl:value-of select="name(.)"/>",
-      _xspAttr
+      "<xsl:value-of select="name(.)"/>"
     );
-    _xspAttr.clear();
 
     <xsl:apply-templates select="node()[not(
         (namespace-uri(.) = $xsp-uri and local-name(.) = 'attribute') or
         (namespace-uri(.) = $xsp-uri and local-name(.) = 'logic' and ./xsp:attribute)
       )]"/>
 
-    this.contentHandler.endElement(
+    _endElem(
       "<xsl:value-of select="namespace-uri(.)"/>",
       "<xsl:value-of select="local-name(.)"/>",
       "<xsl:value-of select="name(.)"/>"

Modified: cocoon/trunk/commons/status.xml
URL: http://svn.apache.org/viewcvs/cocoon/trunk/commons/status.xml?rev=393428&r1=393427&r2=393428&view=diff
==============================================================================
--- cocoon/trunk/commons/status.xml (original)
+++ cocoon/trunk/commons/status.xml Wed Apr 12 03:24:22 2006
@@ -175,6 +175,11 @@
   <!-- These are the changes from the last 2.1.x version. -->
  <changes>
   <release version="@version@" date="@date@">
+    <action dev="AN" type="add">
+      XSP block: Use private methods to call start/endElement in xsp.xsl.
+      That generates smaller bytecode allowing to compiler larger XSPs before hitting the
+      64k limit for the size of the generate() method.
+    </action>
     <action dev="CZ" type="update">
       Removed obsolete support for JCS.
     </action>



Mime
View raw message