Return-Path: Delivered-To: apmail-cocoon-cvs-archive@www.apache.org Received: (qmail 55383 invoked from network); 20 Jul 2005 11:33:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 20 Jul 2005 11:33:41 -0000 Received: (qmail 26348 invoked by uid 500); 20 Jul 2005 11:33:39 -0000 Delivered-To: apmail-cocoon-cvs-archive@cocoon.apache.org Received: (qmail 26293 invoked by uid 500); 20 Jul 2005 11:33:38 -0000 Mailing-List: contact cvs-help@cocoon.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@cocoon.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@cocoon.apache.org Received: (qmail 26278 invoked by uid 99); 20 Jul 2005 11:33:38 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 20 Jul 2005 04:33:27 -0700 Received: (qmail 55248 invoked by uid 65534); 20 Jul 2005 11:33:25 -0000 Message-ID: <20050720113325.55245.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r219881 - in /cocoon: blocks/xsp/trunk/conf/ blocks/xsp/trunk/java/org/apache/cocoon/components/language/markup/ blocks/xsp/trunk/java/org/apache/cocoon/components/language/markup/xsp/ blocks/xsp/trunk/samples/ blocks/xsp/trunk/samples/java... Date: Wed, 20 Jul 2005 11:33:19 -0000 To: cvs@cocoon.apache.org From: anathaniel@apache.org X-Mailer: svnmailer-1.0.2 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: anathaniel Date: Wed Jul 20 04:33:16 2005 New Revision: 219881 URL: http://svn.apache.org/viewcvs?rev=219881&view=rev Log: XSP block: Added short-cut notation {#expr} for interpolation of XSP expressions in attribute values and text nodes. Removed wrapping of all text nodes from XSP source into <xsp:text> elements before passing them to logicsheets. (This feature was not used by the standard logicsheets but check your custom logicsheets whether they depend on it.) Contribution by Jochen Kuhnle (werbung@kuhnle.net) Bugzilla #35228. Added: cocoon/blocks/xsp/trunk/java/org/apache/cocoon/components/language/markup/xsp/XSPExpressionFilter.java (with props) cocoon/blocks/xsp/trunk/java/org/apache/cocoon/components/language/markup/xsp/XSPExpressionParser.java (with props) cocoon/blocks/xsp/trunk/samples/java/interpolation.xsp (with props) Modified: cocoon/blocks/xsp/trunk/conf/xsp-markup.xconf cocoon/blocks/xsp/trunk/java/org/apache/cocoon/components/language/markup/AbstractMarkupLanguage.java cocoon/blocks/xsp/trunk/java/org/apache/cocoon/components/language/markup/CocoonMarkupLanguage.java cocoon/blocks/xsp/trunk/java/org/apache/cocoon/components/language/markup/xsp/XSPMarkupLanguage.java cocoon/blocks/xsp/trunk/samples/samples.xml cocoon/trunk/status.xml Modified: cocoon/blocks/xsp/trunk/conf/xsp-markup.xconf URL: http://svn.apache.org/viewcvs/cocoon/blocks/xsp/trunk/conf/xsp-markup.xconf?rev=219881&r1=219880&r2=219881&view=diff ============================================================================== --- cocoon/blocks/xsp/trunk/conf/xsp-markup.xconf (original) +++ cocoon/blocks/xsp/trunk/conf/xsp-markup.xconf Wed Jul 20 04:33:16 2005 @@ -31,6 +31,15 @@ + + + + + + + + + + Attribute and Text Interpolation + +

+ {#Constants.COMPLETE_NAME} allows to use {##expr} + to replace the value of the Java expression expr + within attribute values and text nodes. +

+ +

+ For expression interpolation in text nodes the difference is to + the usual xsp:expr syntax is minor. + For dynamic attribute values, however, interpolation + keeps it much more concise and readable. +

+
+        
+          String world = "world";
+          String color = "red";
+        
+        ]]>
+      
+ + + String world = "world"; + String color = "red"; + + +

+ Just compare this: +

+
Hello {##world}!]]>
+      
+
Hello {#world}!
+ +

+ to that: +

+
color:colorHello world!]]>
+      
+
color:colorHello world!
+ +
+
+ +
Propchange: cocoon/blocks/xsp/trunk/samples/java/interpolation.xsp ------------------------------------------------------------------------------ svn:eol-style = native Modified: cocoon/blocks/xsp/trunk/samples/samples.xml URL: http://svn.apache.org/viewcvs/cocoon/blocks/xsp/trunk/samples/samples.xml?rev=219881&r1=219880&r2=219881&view=diff ============================================================================== --- cocoon/blocks/xsp/trunk/samples/samples.xml (original) +++ cocoon/blocks/xsp/trunk/samples/samples.xml Wed Jul 20 04:33:16 2005 @@ -40,6 +40,9 @@ Hello page with stripped empty spaces + + Using attribute and text interpolation. + Simple XSP example showing usage of several logicsheets. Modified: cocoon/trunk/status.xml URL: http://svn.apache.org/viewcvs/cocoon/trunk/status.xml?rev=219881&r1=219880&r2=219881&view=diff ============================================================================== --- cocoon/trunk/status.xml (original) +++ cocoon/trunk/status.xml Wed Jul 20 04:33:16 2005 @@ -197,6 +197,14 @@ + + XSP block: Added short-cut notation {#expr} for interpolation of + XSP expressions in attribute values and text nodes. + Removed wrapping of all text nodes from XSP source into <xsp:text> + elements before passing them to logicsheets. + (This feature was not used by the standard logicsheets but check your + custom logicsheets whether they depend on it.) + Portal block: Remove deprecated Publisher, Subscriber, Filter and Register.