You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Peter Brant <pm...@gmx.at> on 2004/09/16 02:33:37 UTC

Small change to JXTemplateGenerator

Hi all,

I think this is a bug, but just to make sure.  When copying an attribute
value containing no expressions, the original value shouldn't be used
because \ escapes will change the final value.  Patch is against
BRANCH_2_1_X.

Thanks,

Pete

--- JXTemplateGenerator.java.orig       2004-09-16 02:08:03.000000000 +0200
+++ JXTemplateGenerator.java    2004-09-16 02:23:46.000000000 +0200
@@ -1194,7 +1194,7 @@
                 }
                 if (buf.length() > 0) {
                     if (substEvents.size() == 0) {
-                        attributeEvents.add(new CopyAttribute(uri, local,
qname, type, value));
+                        attributeEvents.add(new CopyAttribute(uri, local,
qname, type, buf.toString()));
                     } else {
                         substEvents.add(new Literal(buf.toString()));
                         attributeEvents.add(new SubstituteAttribute(uri,
local, qname, type, substEvents));

-- 
Superg�nstige DSL-Tarife + WLAN-Router f�r 0,- EUR*
Jetzt zu GMX wechseln und sparen http://www.gmx.net/de/go/dsl