cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Washeim <esa...@canuck.com>
Subject Re: separate logic
Date Tue, 11 Jul 2000 09:55:53 GMT
on 11/7/00 11:48 am, Torsten Curdt at tcurdt@dff.st wrote:

> In every XSP page I like to have...
> 
> <xsl:template match="something">
> <xsp:logic>
> ...
> <xsl:apply-templates/>
> ...
> </xsp:logic>
> </xsl:template>
> 
> But since it's always the I want
> to separate it... like:
> 
> <xsl:template match="something">
> <xsl:include href="otherfile.xsp"/>
> </xsl:template>
> 
> 
> otherfile.xsp:
> <xsp:logic>
> ...
> <xsl:apply-templates/>
> ...
> </xsp:logic>
> 
> What's the best way to do that?
> Maybe the XInclude processor again!?
> (I'm getting really confused about this
> including topic..)
> --
> Torsten
> 

I've found the best way to do this is to write a tag-library. Though, a
quick and dirty solution is to use Doctype entity declarations to inlude the
logic . . .


<!DOCTYPE xsp:page [
 <!ENTITY logic SYSTEM "class/logic.xml">

]>

then, in the body of the xsp:

<xsp:page 
  language="java" create-session="true"
  xmlns:xsp="http://www.apache.org/1999/XSP/Core"
>
      <xsp:logic>
         &logic; 

        ... more logic . . .
     </xsp:logic> 

 <ROOT>
....




-- 
Mark (Poetaster) Washeim

'On the linen wrappings of certain mummified remains
found near the Etrurian coast are invaluable writings
that await translation.

Quem colorem habet sapientia?'

Evan S. Connell

 



Mime
View raw message