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: [EMAIL PROTECTED] To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]