What version of cocoon are you using? Geoff --- Tom Place <[EMAIL PROTECTED]> wrote: > After searching the created "Java" file (apologies > for my earlier > mistake), the request helper is the only place it > could be trying to set > the variable. > For example the following XSP (entire file) : > > +---------------------------------------------------------+ > <?xml version="1.0"?> > > <xsp:page > xmlns:xsp="http://apache.org/xsp" > > xmlns:xsp-session="http://apache.org/xsp/session/2.0" > create-session="true"> > > <page> > <xsp-session:set-attribute > name="fruit">Apple</xsp-session:set-attribute> > <fruit><xsp-session:get-attribute > name="fruit"/></fruit> > </page> > > </xsp:page> > +---------------------------------------------------------+ > > Generates the following Java > > +---------------------------------------------------------+ > public class test_xsp extends XSPGenerator { > > static { > dateCreated = 1037088922427L; > dependencies = new File[]{ > }; > } > > /* Built-in parameters available for use */ > // context - ServletContext > // request - HttpServletRequest > // response - HttpServletResponse > // parameters - parameters defined in the sitemap > > /* User Class Declarations */ > > > /** > * Generate XML data. > */ > public void generate() throws SAXException, > IOException, > ProcessingException { > > > > this.contentHandler.startDocument(); > AttributesImpl xspAttr = new AttributesImpl(); > > > > this.contentHandler.startPrefixMapping("xml", > "http://www.w3.org/XML/1998/namespace"); > > this.contentHandler.startPrefixMapping("xsp", > "http://apache.org/xsp"); > > > this.contentHandler.startPrefixMapping("xsp-session", > "http://apache.org/xsp/session/2.0"); > > > this.contentHandler.startElement("", "page", > "page", xspAttr); > > xspAttr.clear(); > > > this.characters("\n "); > > > XSPRequestHelper.setSessionAttribute(objectModel, > > String.valueOf("fruit"), > > this.characters("Apple"); > ); > > this.characters("\n "); > > > this.contentHandler.startElement("", "fruit", > "fruit", xspAttr); > > xspAttr.clear(); > > > > XSPObjectHelper.xspExpr(contentHandler, > > XSPRequestHelper.getSessionAttribute(objectModel, > > String.valueOf("fruit"), "")); > > > this.contentHandler.endElement("", "fruit", > "fruit"); > > > this.characters("\n "); > > > this.contentHandler.endElement("", "page", > "page"); > > > this.contentHandler.endPrefixMapping("xml"); > > this.contentHandler.endPrefixMapping("xsp"); > > > this.contentHandler.endPrefixMapping("xsp-session"); > > > this.contentHandler.endDocument(); > } > } > > +---------------------------------------------------------+ > > So as you can see from the above the only place it > is possible creating > the session variable is > XSPRequestHelper.setSessionAttribute(objectModel, > > String.valueOf("fruit"), > > this.characters("Apple"); > ); > And this is where the rogue semicolon appears. > > I can remove the rogue semicolon by creating the > String "Apple" and > reverencing that string through <xsp:expr> tags. But > this leads to a > nullPointerException. > > I think that either I am being really dim with this > or some powers that > I can't control are at work here! > > Thanks for everyone's help so far > > Tom Place > > > --------------------------------------------------------------------- > Please check that your question has not already > been answered in the > FAQ before posting. > <http://xml.apache.org/cocoon/faq/index.html> > > To unsubscribe, e-mail: > <[EMAIL PROTECTED]> > For additional commands, e-mail: > <[EMAIL PROTECTED]> >
__________________________________________________ Do you Yahoo!? U2 on LAUNCH - Exclusive greatest hits videos http://launch.yahoo.com/u2 --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>