Return-Path: Mailing-List: contact cocoon-users-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-users@xml.apache.org Received: (qmail 34911 invoked from network); 3 May 2000 18:39:43 -0000 Received: from f214.law4.hotmail.com (HELO hotmail.com) (216.33.149.214) by locus.apache.org with SMTP; 3 May 2000 18:39:43 -0000 Received: (qmail 62555 invoked by uid 0); 3 May 2000 18:39:16 -0000 Message-ID: <20000503183916.62554.qmail@hotmail.com> Received: from 148.88.17.9 by www.hotmail.com with HTTP; Wed, 03 May 2000 11:39:16 PDT X-Originating-IP: [148.88.17.9] From: "Robin Green" To: cocoon-users@xml.apache.org Subject: Re: XSP adding XML java. Date: Wed, 03 May 2000 19:39:16 BST Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N Kees Jongenburger wrote: >i am currently writing a poll class witch should be used as part of an >XSPlib >to be incorporated with different pages. Now the poll class should return >part >of an XML document something like >this: > > > Should Cocoon have default polls? > > > > > > > >my xsl(from the lib) looks like this: > > > forum.getForum() > > > > >Now in java if i return a String the < and > tags are transformed so that >the exact text is displayed . If i return an XObject results are better >(only the #text is returned but the tags are omited) > >what should the aproch be? >i realy whant to be able to use "Pure" java to create document fragments >witch >wil be processed by the xslt > No probs. I've been doing that myself for a web discussion board package. It's easy. Just build a DOM Element and don't use to insert it, but instead use this code, or something like it: xspCurrentNode.appendChild (forum.getForum()); I have made a little tag to encapsulate this (when using XSP), called xspCurrentNode.appendChild( ); so you can then just say (in an XSP page, not in a stylesheet) object.toXML() // NOTE: no semicolon but that's just for convenience, you don't need to make an abstract tag for it. -- Robin 270+ Open Source Java links! http://directory.mozilla.org/Computers/Programming/Languages/Java/Open_Source/ ________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com