Re: Servlet Examples in HEAD v.s. 0.20.5
On Sun, 2004-01-18 at 08:49, J.Pietschmann wrote: > John Austin wrote: > >(is Content-length: required for any reason other than placating > >Acrobat and that rich hermit who lives outside Redmond WA ?) > > Not really a FOP topic but anyway. > Setting content-length is considered "good style", because it allows > browsers give feedback to the users how far the download proceeded. > This is especially useful for larger files on slow connections. > Of course, there is a tradeoff for dynamically generated content: > there wont be any feedback at all until the content is ready, and > if this is longer than the download time itself (now that everybody > has broadband :-) ), the user is still dissatisfied. Well, the > IEx architecture bug saves us from pondering the philosophical > background. Mentioned because it is in the extant codebase even though it isn't necessary. I deduce it is related to Acrobat because of cryptic comments in the documentation. > > 2) Cache Templates objects for faster Transformations when XSLT > >files are to be re-used. The 'Java and XSLT' O'Reilly book > >has some interesting suggestions in this area. > > The problem is to detect style sheet reuse without context information. I think the only prob is how to purge from the cache. Re-use detected if names are URL's. Still faces the problem of detecting changes to stylesheets. Discussed a bit in Burke's book. > > 3) Using URL's for the fo= and xml=,xsl= parameters so we can use > >network resources as well as local files. > > +1000. > Doh, revert to +0. I'd like to do this, unfortunately, this is not > without drawbacks: > - People have to learn what an URI is. This seems to be much harder > than expected, especially for file:-URLs. > - People will still insist to keep "xml=foo.xml". This is still an > URL (actually: a relative URL reference, which has to be resolved). > We have to think hard what the base URL is in this case. What if default xml=fred.xml is mapped to xml=file://./fred.xml where the servlet's 'working dir' is defined relative to servlet context. The we can ship some of our test xml/xsl files in that location and people have something to start with. > J.Pietschmann -- John Austin <[EMAIL PROTECTED]>
Re: Servlet Examples in HEAD v.s. 0.20.5
John Austin wrote: (is Content-length: required for any reason other than placating Acrobat and that rich hermit who lives outside Redmond WA ?) Not really a FOP topic but anyway. Setting content-length is considered "good style", because it allows browsers give feedback to the users how far the download proceeded. This is especially useful for larger files on slow connections. Of course, there is a tradeoff for dynamically generated content: there wont be any feedback at all until the content is ready, and if this is longer than the download time itself (now that everybody has broadband :-) ), the user is still dissatisfied. Well, the IEx architecture bug saves us from pondering the philosophical background. 2) Cache Templates objects for faster Transformations when XSLT files are to be re-used. The 'Java and XSLT' O'Reilly book has some interesting suggestions in this area. The problem is to detect style sheet reuse without context information. 3) Using URL's for the fo= and xml=,xsl= parameters so we can use network resources as well as local files. +1000. Doh, revert to +0. I'd like to do this, unfortunately, this is not without drawbacks: - People have to learn what an URI is. This seems to be much harder than expected, especially for file:-URLs. - People will still insist to keep "xml=foo.xml". This is still an URL (actually: a relative URL reference, which has to be resolved). We have to think hard what the base URL is in this case. J.Pietschmann
Re: Servlet Examples in HEAD v.s. 0.20.5
On Sat, 2004-01-17 at 19:18, Jeremias Maerki wrote: > Discussion on this can be found here: > http://marc.theaimsgroup.com/?t=10383153256&r=1&w=2 > http://marc.theaimsgroup.com/?t=10172302692&r=1&w=2 > > There were pros and cons about the move from examples into the main > source tree. I think the triggering point was that the servlet sees real > use and doesn't really qualify as an "example". I agree that with > today's build it may not be so obvious what is necessary to build the > WAR file (the various parts are distributed in the source tree). But the > WAR file gets built automatically today. Doh! I did a 'locate fop.war' and there it is! Of course, my oldish snapshot from HEAD doesn't work, so there was no output from running it, but it does build and deploy into Tomcat. > Proposal: I like your ideas. I also think that we have to preserve the > simplicity of the servlet as an educational example for people who want > to play with it. So what about resurrecting the examples/servlet but > keeping it real simple? Just the basics. And the servlet in the main > source tree stays where it is but gets your new features. I would expect an example servlet to be quite simple with descriptive comments and suggestions for variations. The purpose here would be to provide a prototypical webapp that could be used to populate a small project in the user's development space. I did find it difficult to settle on a set of features that I would include in a single 'FopServlet' program. This is simplified if FopServlet is primarily real working code. I would be comfortable with an org.apache.fop.servlet.FopServlet that included some more advanced features: 1) Deflate and Inflate the byte stream used to store the PDF file (is Content-length: required for any reason other than placating Acrobat and that rich hermit who lives outside Redmond WA ?) 2) Cache Templates objects for faster Transformations when XSLT files are to be re-used. The 'Java and XSLT' O'Reilly book has some interesting suggestions in this area. 3) Using URL's for the fo= and xml=,xsl= parameters so we can use network resources as well as local files. 4) Detect IE and redirect users to a URL that has the proper '.pdf' filetypes in basename and end of request URL. 5) The servlet could be used as part of an automated testing process. The fop.war file could be deployed in Tomcat as part of an HttpUnit test and then many of our tests could be run using HttpUnit. Examples could be simpler than this as they have the specific purpose of illustrating a practical use case. > German speaking Swiss people would say you get "de Föifer und's Weggli" > (freely translated to english: the 5 cent piece and the donut. Meaning: > You get twice as happy. Want to know what a "Weggli" is? Go to > http://www.jowa.ch/1776/1846/1847/1865/1867.asp). :-) My German has atrophied over the past 31 years. I left Ramstein, Germany in July 1973 and except for one undregrad course, have only spoken German once or twice since. [I stopped overnight in Lahr about 1978.] As a Canadian I understand 'donut' (see http://www.timhortons.com/) but I always think of brotchen as a German pastry. -- John Austin <[EMAIL PROTECTED]>
Re: Servlet Examples in HEAD v.s. 0.20.5
Discussion on this can be found here: http://marc.theaimsgroup.com/?t=10383153256&r=1&w=2 http://marc.theaimsgroup.com/?t=10172302692&r=1&w=2 There were pros and cons about the move from examples into the main source tree. I think the triggering point was that the servlet sees real use and doesn't really qualify as an "example". I agree that with today's build it may not be so obvious what is necessary to build the WAR file (the various parts are distributed in the source tree). But the WAR file gets built automatically today. Proposal: I like your ideas. I also think that we have to preserve the simplicity of the servlet as an educational example for people who want to play with it. So what about resurrecting the examples/servlet but keeping it real simple? Just the basics. And the servlet in the main source tree stays where it is but gets your new features. German speaking Swiss people would say you get "de Föifer und's Weggli" (freely translated to english: the 5 cent piece and the donut. Meaning: You get twice as happy. Want to know what a "Weggli" is? Go to http://www.jowa.ch/1776/1846/1847/1865/1867.asp). :-) On 17.01.2004 21:52:06 John Austin wrote: Jeremias Maerki