RE: RE: [Mav-user] Transforms and how they are implemented

2003-06-24 Thread Schnitzer, Jeff
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 
 I am wondering if there could be a different type of wrapper for
content,
 instead of transforms, so that it could just act the same as jsp
includes.
 
 Like same idea as the friendbook type transform, but stream everything
 out.
 
 Ex:
 view name=success path=edit.jsp
 include path=trimInside.jsp/
 /view
 
 Then it would treat that trim like an include instead of a transform?

You can already do this quite easily like this:

view name=success path=trimInside.jsp
param name=body value=edit.jsp/
/view

This way you have a trimInside.jsp that looks something like this:

html
  body
 ...blah header blah...
 ...blah navbar blah...

 jsp:include page=%= request.getAttribute(body) %
flush=true/
  /body
/html

This will work just fine and eliminate the buffering overhead.  However,
it puts some serious limitations on how the body can interact with the
trim because now the trim is being executed _before_ the body.  One of
the nice things about having the body execute first is that it can set
up parameters in the request attributes that affect behavior of trim
execution, such as specifying a title for the page.  This is hard to do
with the include-based operation above.

Of course to get really complicated, I'd be surprised if struts-tiles
didn't work with Maverick.

BTW, this is one area in which XSL *really* shines, at least as far as
flexibility is concerned.  Performance might be an issue depending on
the operations, unfortunately :-(

Jeff Schnitzer
[EMAIL PROTECTED]


---
This SF.Net email is sponsored by: INetU
Attention Web Developers  Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
[INVALID FOOTER]


RE: RE: [Mav-user] Transforms and how they are implemented

2003-06-22 Thread travis
So using this, it would be impossible to flush output as it's being processed, say 
process, flush, process, flush on a page that takes a long time to do something?

Travis

 Original Message 
From: Schnitzer, Jeff [EMAIL PROTECTED]
Sent: 2003-06-21
To: [EMAIL PROTECTED]
Subject: RE: [Mav-user] Transforms and how they are implemented

 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 
 Just a question on how the transforms are implemented.  Will it
process
 the entire wrapped portion before outputting?  So say if you had a
very
 long page in the wrapped, woudl it process that before outputting
 anything?

Processing always occurs linearly along the pipeline.  The view is
processed, then the first transform, then the next transform, etc.*  In
the case of document aka wrapping transforms, the previous step is fully
executed and the output is buffered.  Then a String is made out of that
data, placed in the request attributes, and the transform document is
executed.

This means you should probably be careful about doing this with
super-huge pages on high-volume sites... but if you're worried, profile
it first.  Usually any sophisticated system has other much worse
bottlenecks.

* If the connections between steps are made with SAX events, then the
whole assembly is put together and executed as-is.  How the work is
broken down is up to the transformation engine (xalan, etc).

Jeff Schnitzer
[EMAIL PROTECTED]


---
This SF.Net email is sponsored by: INetU
Attention Web Developers  Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
[INVALID FOOTER]




---
This SF.Net email is sponsored by: INetU
Attention Web Developers  Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
[INVALID FOOTER]