On Tuesday 25 June 2002 09:31, Philip Mak wrote: > For example, take the following simple example of a webpage that has a > form which says "Enter your name", and submits to itself upon which it > redisplays the name entered: > > <xsp:page > xmlns:xsp="http://apache.org/xsp/core/v1" > xmlns:param="http://axkit.org/NS/xsp/param/v1" > language="Perl" > > <page> > <xsp:logic> > if (<param:name/>) { > <xsp:content> > Your name is: <param:name/> > </xsp:content> > } > else { > <xsp:content> > <form> > Enter your name: <input type="text" name="name" /> > <input type="submit"/> > </form> > </xsp:content> > } > </xsp:logic> > </page> > </xsp:page> > > Am I missing the point here?
Adding to what Matt said, there's also the fact that if you're looking at having a well-organized website with moderately complex functionality, you're probably going to create a taglib instead of coding straight inside the page. That taglib would be written using one of the helper modules, making it easy. So if I were doing that site, the above would look like: <xsp:page xmlns:xsp="http://apache.org/xsp/core/v1" xmlns:sillytest="http://robin.berjon.com/is/a/dahut/" language="Perl"> <sillytest:name-or-form /> </xsp:page> And that would be it. The SillyTest taglib would handle insertion of either <sillytest:prompt-for-name/> or of <sillytest:show-name name='Donald Ahut' /> which would then get transformed by the XSLT stylesheet. Of course on such a limited example there's little advantage. But on anything larger, even garden variety websites, then it's a win. -- Robin Berjon <[EMAIL PROTECTED]> -- for hire: http://robin.berjon.com/ In which level of metalanguage are you now speaking? --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
