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 31788 invoked from network); 2 May 2000 10:26:53 -0000 Received: from f265.law4.hotmail.com (HELO hotmail.com) (216.33.148.143) by locus.apache.org with SMTP; 2 May 2000 10:26:53 -0000 Received: (qmail 17375 invoked by uid 0); 2 May 2000 10:26:29 -0000 Message-ID: <20000502102629.17374.qmail@hotmail.com> Received: from 148.88.17.9 by www.hotmail.com with HTTP; Tue, 02 May 2000 03:26:29 PDT X-Originating-IP: [148.88.17.9] From: "Robin Green" To: cocoon-users@xml.apache.org Subject: Re: Newbie: DOM -XSL-> markup? Date: Tue, 02 May 2000 11:26:29 BST Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N morten@itu.dk wrote: >All the information I\'ve found on XML/DOM/XSL etc >is rather focused on applying XSL on XML files. XML entities in Cocoon do not have to be actual "files" on a disc. They can be entirely generated at request time, for example. The word "files" is just used as a figure of speech. >Is there a way to control XSL in my \'object space\'? >What I want to do, is generate a DOM object on >the basis of IMAP data, apply client dependant >XSL to that, and output a valid markup (eg. WML/HTML). >The XML technologies are new to me, so if this >doesn\'t make sense, please correct me: >Can I construct a DOM object in memory, instantiate >some \'XSL object\' from an XSL file and somehow >generate/restrict output based on that? Sure, this is precisely what Cocoon does! Write either a Producer or an XSP page to construct the DOM object (XSP will be probably be easier and more maintainable), and return it from the getDocument methods (this is done automatically with XSP, you don't need to do anything). Put processing instructions in the DOM to specify the stylesheet and formatters to be used, and Cocoon will do the rest. See the javadocs for org.apache.cocoon.producer.Producer (no typo). However, be warned - DOM will not be used in Cocoon 2, SAX will because it's faster. >Pointers to info relevant to this topic is greatly >appreciated, thanks. > The xml.apache.org webserver is not responding right now (connection refused) but you should have all the docs you need under docs javadocs or build/docs in your cocoon directory. -- 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