Return-Path: Delivered-To: apmail-xml-cocoon-cvs-archive@xml.apache.org Received: (qmail 63851 invoked by uid 500); 23 Oct 2002 03:42:25 -0000 Mailing-List: contact cocoon-cvs-help@xml.apache.org; run by ezmlm Precedence: bulk Reply-To: cocoon-dev@xml.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list cocoon-cvs@xml.apache.org Received: (qmail 63831 invoked by uid 500); 23 Oct 2002 03:42:25 -0000 Delivered-To: apmail-xml-cocoon2-cvs@apache.org Date: 23 Oct 2002 03:42:22 -0000 Message-ID: <20021023034222.7289.qmail@icarus.apache.org> From: vgritsenko@apache.org To: xml-cocoon2-cvs@apache.org Subject: cvs commit: xml-cocoon2/src/java/org/apache/cocoon/generation SessionAttributeGenerator.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N vgritsenko 2002/10/22 20:42:22 Modified: src/java/org/apache/cocoon/generation SessionAttributeGenerator.java Log: use XMLUtil version of xsp:expr Revision Changes Path 1.3 +6 -9 xml-cocoon2/src/java/org/apache/cocoon/generation/SessionAttributeGenerator.java Index: SessionAttributeGenerator.java =================================================================== RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/generation/SessionAttributeGenerator.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- SessionAttributeGenerator.java 22 Oct 2002 03:21:58 -0000 1.2 +++ SessionAttributeGenerator.java 23 Oct 2002 03:42:22 -0000 1.3 @@ -59,6 +59,7 @@ import org.apache.cocoon.environment.Request; import org.apache.cocoon.generation.AbstractGenerator; import org.apache.cocoon.xml.XMLizable; +import org.apache.cocoon.xml.XMLUtils; import org.apache.cocoon.ProcessingException; import org.xml.sax.helpers.AttributesImpl; @@ -165,7 +166,7 @@ String msg = "Session attribute '" + attrName + "' needs an enclosing element : class is " + this.attrObject.getClass().getName(); - getLogger().error(msg); + getLogger().warn(msg); throw new ProcessingException(msg); } } @@ -175,18 +176,14 @@ * Generate XML data */ public void generate() throws IOException, SAXException, ProcessingException { - xmlConsumer.startDocument(); - + if (this.elementName != null) { - xmlConsumer.startElement("", this.elementName, this.elementName, new AttributesImpl()); - XSPObjectHelper.xspExpr(xmlConsumer, this.attrObject); + XMLUtils.valueOf(xmlConsumer, this.attrObject); xmlConsumer.endElement("", this.elementName, this.elementName); - } else { - - XSPObjectHelper.xspExpr(xmlConsumer, this.attrObject); + XMLUtils.valueOf(xmlConsumer, this.attrObject); } xmlConsumer.endDocument(); ---------------------------------------------------------------------- In case of troubles, e-mail: webmaster@xml.apache.org To unsubscribe, e-mail: cocoon-cvs-unsubscribe@xml.apache.org For additional commands, e-mail: cocoon-cvs-help@xml.apache.org