Re: xsl:apply-templates bug?

2002-05-15 Thread Mike Dewar

If you select just the column nodes then they are indeeed in positions
1 to 4.  However if you select all nodes then your "header" is in
position 1, and your "columns" in 2-5.

Mike.

On Tue, May 14, 2002 at 08:47:57PM +0200, J.Pietschmann wrote:
> Spectron International, Inc. wrote:
> > I have noticed something with xsl:apply-templates I don't know if it is a
> > bug but it seems to me that it shouldn't work that way. I have the following
> > xml:
> > 
> > 
> >   
> >   
> >   
> >   
> > 
> ...
> > 
> >   
> > 
> > 
> > If I use  it will return the expected
> > numbers (1,2,3,4) if I only use  it returns (2,3,4,5).
> > Why is that?
> 
> This is an XSLT question which should better have asked on the
> XSL list.
> As for the problem itself: the behaviour is probably correct.
> When using , templates are applied to all
> child nodes, including text nodes which consist of whitespace
> only (usually to format the source XML) and comments. If you
> have a comment before your first column element, it is at
> position 1. Look hard at your source.
> 
> J.Pietschmann
> 
> 
> -
> Please check that your question has not already been answered in the
> FAQ before posting. 
> 
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>
> 
> 
> _
> This message has been checked for all known viruses by Star Internet
> delivered through the MessageLabs Virus Scanning Service. For further
> information visit http://www.star.net.uk/stats.asp or alternatively call
> Star Internet for details on the Virus Scanning Service.

_
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.

-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: Problem with 'large' STATIC pdf files

2002-04-22 Thread Mike Dewar

Hi,

I've just downloaded the sources and read the "todo.xml" file which
says:

  
   Allow a Reader to give the content length to pipelines. This will
   allow to correctly serve static PDFs (well-known IE+Acrobat bug)
   without requiring to buffer the whole file in memory to know its
   content length.
  

Leaving aside the fact that it has nothing to do with IE+Acrobat per se,
this would suggest that Cocoon is fundamentally broken here and that
readers are not in fact safe to use.  I was planning to use Apache to
serve everything which isn't generated on-the-fly directly, but will
check out your suggestion of defining a tomcat context.

Cheers,
Mike.

On Mon, Apr 22, 2002 at 01:17:44PM +0100, Christopher Watson wrote:
> Mike
> 
> Using the CVS version made it 'better' ...
> wget seemed to reliably get all the file.
> But I was still having intermittent problems when using a browser.
> The browser problems seemed to go away if I put a dummy query string on the
> end of the URL, e.g.
> http://server/something.pdf?a=a
> That's with IE6, haven't tried it elsewhere
> 
> Sorry about the use of the word seemed , but then it's an intermittent
> problem :-?
> 
> However, other bits of the CVS version functioned differently from release
> 2.0.1, (see my separate message)
> so I had to abandon it for now for my own purposes.
> 
> I ended up defining a new tomcat context (in config/server.xml) to serve the
> pdf files, which seems (there's that word again) fine.
> 
> Christopher Watson
> > -Original Message-
> > From: Mike Dewar [mailto:[EMAIL PROTECTED]]
> > Sent: 22 April 2002 10:22
> > To: [EMAIL PROTECTED]
> > Subject: Re: Problem with 'large' STATIC pdf files
> >
> >
> > I have exactly this problem, which I reported to this list last week.  I
> > also tried wget and was surprised to see that it reported the size of
> > the file to be the truncated length, rather than the true length.
> > Looking in core.log I see the content-size reported as -1.
> >
> > Its an intermitant problem - if you can get the whole file cached then
> > everything appears to work normally.
> >
> > Let me know if you find a solution.
> >
> > Mike.
> >
> > On Sat, Apr 20, 2002 at 07:10:51PM +0100, Christopher Watson wrote:
> > > Vadim, the plot thickens.
> > >
> > > I've unearthed cygwin's wget.
> > > On the 2.0.2 release build it gets all 175958 bytes !
> > > Shame my browsers don't :-<
> > >
> > > BUT On the current CVS (HEAD branch) it only gets 32768 bytes.
> > >
> > > The opposite of what I would have expected/hoped
> > >
> > > Christopher
> > >
> > > > -Original Message-
> > > > From: Vadim Gritsenko [mailto:[EMAIL PROTECTED]]
> > > > Sent: 20 April 2002 16:44
> > > > To: [EMAIL PROTECTED]; 'Christopher Watson'
> > > > Subject: RE: Problem with 'large' STATIC pdf files
> > > >
> > > >
> > > > > From: Christopher Watson [mailto:[EMAIL PROTECTED]]
> > > > >
> > > > > Can anyone help - from the archives I think there've been a
> > few people
> > > > down
> > > > > this road, but I haven't see anything very hopeful.
> > > > >
> > > > > I'm trying to serve up static PDF files using
> > > > >
> > > > >
> > > > > 
> > > > >
> > > > >
> > > > > These are simply exposed as download/viewable files by  > > > > href="pdf/something.pdf">
> > > > >
> > > > > If I right click and download, I only get the first 32768 bytes.
> > > > > The .pdf file file is 115Kb.
> > > > >
> > > > > Bizarrely, I can download all of an 82KB one with no problem
> > > > >
> > > > >
> > > > > I did a sanity check with a large (300kb) image file
> > > > > served by
> > > > >
> > > > >
> > > > > 
> > > > >
> > > > >
> > > > > which I could right-click and save OK.
> > > > >
> > > > >
> > > > > What am I doing wrong?
> > > > > Why the different behaviour?
> > > >
> > > > Should not be. Reader processes all file types similarly.
> > > >
> > > >
> > > > > Is there anywhere where a max

Re: Problem with 'large' STATIC pdf files

2002-04-22 Thread Mike Dewar

I have exactly this problem, which I reported to this list last week.  I
also tried wget and was surprised to see that it reported the size of
the file to be the truncated length, rather than the true length.
Looking in core.log I see the content-size reported as -1.

Its an intermitant problem - if you can get the whole file cached then
everything appears to work normally.

Let me know if you find a solution.

Mike.

On Sat, Apr 20, 2002 at 07:10:51PM +0100, Christopher Watson wrote:
> Vadim, the plot thickens.
> 
> I've unearthed cygwin's wget. 
> On the 2.0.2 release build it gets all 175958 bytes !
> Shame my browsers don't :-<
> 
> BUT On the current CVS (HEAD branch) it only gets 32768 bytes.
> 
> The opposite of what I would have expected/hoped
> 
> Christopher
> 
> > -Original Message-
> > From: Vadim Gritsenko [mailto:[EMAIL PROTECTED]]
> > Sent: 20 April 2002 16:44
> > To: [EMAIL PROTECTED]; 'Christopher Watson'
> > Subject: RE: Problem with 'large' STATIC pdf files
> > 
> > 
> > > From: Christopher Watson [mailto:[EMAIL PROTECTED]]
> > > 
> > > Can anyone help - from the archives I think there've been a few people
> > down
> > > this road, but I haven't see anything very hopeful.
> > > 
> > > I'm trying to serve up static PDF files using
> > > 
> > >
> > > 
> > >
> > > 
> > > These are simply exposed as download/viewable files by  > > href="pdf/something.pdf">
> > > 
> > > If I right click and download, I only get the first 32768 bytes.
> > > The .pdf file file is 115Kb.
> > > 
> > > Bizarrely, I can download all of an 82KB one with no problem
> > > 
> > > 
> > > I did a sanity check with a large (300kb) image file
> > > served by
> > > 
> > >
> > > 
> > >
> > > 
> > > which I could right-click and save OK.
> > > 
> > > 
> > > What am I doing wrong?
> > > Why the different behaviour?
> > 
> > Should not be. Reader processes all file types similarly.
> > 
> > 
> > > Is there anywhere where a max file size is set for static .pdf's or
> > other
> > > file types?
> > 
> > I don't think so.
> > 
> > 
> > > PS I can serve the pdf through another tomcat servlet OK
> > > 
> > > Same behaviour in ie6, opera 6.0.1, ns 4.73
> > 
> > Try with "wget -S".
> >  
> > > Tomcat 4.0.1 Cocoon 2.0.1 WinNT4 jdk1.3.1
> > 
> > Try Cocoon CVS version (or today's snapshot).
> > 
> > Vadim
> >  
> > 
> > 
> > -
> > Please check that your question has not already been answered in the
> > FAQ before posting. 
> > 
> > To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> > For additional commands, e-mail: <[EMAIL PROTECTED]>
> > 
> > 
> 
> -
> Please check that your question has not already been answered in the
> FAQ before posting. 
> 
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>
> 
> 
> _
> This message has been checked for all known viruses by Star Internet
> delivered through the MessageLabs Virus Scanning Service. For further
> information visit http://www.star.net.uk/stats.asp or alternatively call
> Star Internet for details on the Virus Scanning Service.

_
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.

-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: Problems serving pdf files

2002-04-19 Thread Mike Dewar

Thanks but I don't think that I'm using FOP.  All I'm doing is trying to
serve an existing pdf file:
  

  

  

As an experiment I changed the mime type to text/plain and got the same
result.

Mike.

On Thu, Apr 18, 2002 at 09:58:49PM +0200, J.Pietschmann wrote:
> Mike Dewar wrote:
> > Thanks for this suggestion, but I'm afraid it isn't the answer.  When I
> > say "larger PDF files" I mean over 150K, which is hardly huge.  I tried
> > setting the maximum java heap size to 100Mb anyway but it still didn't
> > work.
> 
> Cocoon uses FOP for rendering PDF, and it can really
> gobble up unbelievable amounts of memory, even for
> relatively small output. 500MB had been reported. It's
> all depending on the complexity of the layout, size of
> embedded graphics and so on. Check your logs, or try to
> generate your PDF with the FOP command line tool. This
> way you can spot FOP problems easier, and if the memory
> shortge is the problem, you can experiment with memory
> settings.
> 
> J.Pietschmann
> 
> 
> -
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> 
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>
> 
> 
> _
> This message has been checked for all known viruses by Star Internet
> delivered through the MessageLabs Virus Scanning Service. For further
> information visit http://www.star.net.uk/stats.asp or alternatively call
> Star Internet for details on the Virus Scanning Service.

_
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.

-
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: Problems serving pdf files

2002-04-16 Thread Mike Dewar

Thanks for this suggestion, but I'm afraid it isn't the answer.  When I
say "larger PDF files" I mean over 150K, which is hardly huge.  I tried
setting the maximum java heap size to 100Mb anyway but it still didn't
work.

There is no error as such in any of the log files, although I notice
that the "CONTENT LENGTH" for the pdf file reported in core.log is -1.
(As an aside, once I serve the (truncated) file once it is cached, is
there any way to flush this?)  Looking at the archives I see that there
were similar problems with serving pdf files generated on-the-fly a
while ago.  Is it possible that in fixing that bug somebody broke
something else?

Mike.
 
On Mon, Apr 15, 2002 at 09:08:11PM +0200, Erwin wrote:
> On Mon, 15 Apr 2002, Mike Dewar wrote:
> 
> > For small files this works fine, but larger pdf files get truncated to
> > 122880 bytes.  Can anybody tell me what I'm doing wrong and suggest a
> > fix?
> >
> My guess is that java then takes up the maximum allowed heapsize. If you
> check to logs, you will probably find java.lang.OutOfMemoryError's.
> 
> You will have to make some changes to your startup-files to increase the
> maximum allowed heapspace. IIRC you have to use the -Xmx option. You
> can get a list of these extended options by executing 'java -X' (without
> the quotes).
> 
> Hope this helps.
> 
> 
> -
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> 
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>
> 
> 
> _
> This message has been checked for all known viruses by Star Internet
> delivered through the MessageLabs Virus Scanning Service. For further
> information visit http://www.star.net.uk/stats.asp or alternatively call
> Star Internet for details on the Virus Scanning Service.

_
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.

-
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Problems serving pdf files

2002-04-15 Thread Mike Dewar

I've just installed cocoon 2.0.2 under tomcat 3.3.1 on Redhat Linux.  I
am trying to serve pdf files with the following pipeline added to the
standard sitemap.xmap that came with the (binary) distribution:

  

  

  

For small files this works fine, but larger pdf files get truncated to
122880 bytes.  Can anybody tell me what I'm doing wrong and suggest a
fix?

Thanks, Mike. 

_
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.

-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>