Re: whitespace inside but outside inserted in to output

2004-05-03 Thread Serge Knystautas
Derek wrote: Did you write that yourself? Is it open source? Or, did you get it from somewhere? I don't want to re-invent the wheel if it's already out there. I did a quick Google search for something like this and didn't turn up anything. It's 100 lines without much docs, and badly written at

Java String to Javascript String

2004-05-03 Thread Eric W Hauser
Has anyone seen a tag library or some example code that will allow you to grab an String from a scoped object and embed it as a Javascript string? What I want to do is: function('blah', '${requestScope.attribute}'); This works fine until attribute contains a carriage return. I haven't tested t

Re: whitespace inside but outside inserted in to output

2004-05-03 Thread Derek
Did you write that yourself? Is it open source? Or, did you get it from somewhere? I don't want to re-invent the wheel if it's already out there. I did a quick Google search for something like this and didn't turn up anything. Thanks! Derek --- Serge Knystautas <[EMAIL PROTECTED]> wrote: > D

Re: whitespace inside but outside inserted in to output

2004-05-03 Thread Andreas Schildbach
Morrow, Steve D. wrote: No; they offer different functionality, so I wouldn't have expected them to behave the same. The tag is not intended to output its body content. In looking at the JavaServer Pages Standard Tag Library docs I have for 1.0, it states the following: - the JSP container pro

RE: whitespace inside but outside inserted in to output

2004-05-03 Thread Morrow, Steve D.
> Would you have expected the CR and the TAB in the source here, too? No; they offer different functionality, so I wouldn't have expected them to behave the same. The tag is not intended to output its body content. In looking at the JavaServer Pages Standard Tag Library docs I have for 1.0, it s

Re: whitespace inside but outside inserted in to output

2004-05-03 Thread Serge Knystautas
Derek wrote: Ok, I looked into using HTML Tidy -- actually the JTidy implementation of it. Here's what could be done: implement the JTidy engine as a filter so that HTML that was output would be "cleaned." Here are the problems: * JTidy adheared to HTML Tidy, which was only HTML 4.0 compliant

Re: whitespace inside but outside inserted in to output

2004-05-03 Thread Derek
Ok, I looked into using HTML Tidy -- actually the JTidy implementation of it. Here's what could be done: implement the JTidy engine as a filter so that HTML that was output would be "cleaned." Here are the problems: * JTidy adheared to HTML Tidy, which was only HTML 4.0 compliant. * HTML Tid

Re: whitespace inside but outside inserted in to output

2004-05-03 Thread Andreas Schildbach
Morrow, Steve D. wrote: I'm just saying I would have expected the space and am interested to know if the different implementations handle this differently. Well, and nested 's do not allow any whitespace to appear in the source (this is for 1.03, 1.04 and 1.10 afaik, I never tried other impleme

Re: whitespace inside but outside inserted in to output

2004-05-03 Thread Andreas Schildbach
Keith wrote: I've noticed that JSP never suppresses any whitespace at all outside the < > characters. I'm doing HTML output, so this doesn't effect me to much in the final output. In HTML it does indeed matter if you do have a whitespace or none at all (not in your special example, though). For

RE: whitespace inside but outside inserted in to output

2004-05-03 Thread Keith
Well, technically I could do that with the operator as well. I just did it for clarity of distinguishing between HTML and JSTL code. I also have other situations with HTML attributes that get to be several lines long. Personally, I'm not too worried about how the HTML source looks in the final

RE: whitespace inside but outside inserted in to output

2004-05-03 Thread Derek
It looks like there as been some discussion before about removing whitespace from the resulting HTML code -- just search in Google on 'whitespace filter tomcat'. It looks like someone proposed building it into the Tomcat engine, while others have proposed making it a filter. I wasn't sucessful in

RE: whitespace inside but outside inserted in to output

2004-05-03 Thread Karl Coleman
The new tertiary operator in JSP 2.0 may help clean this up. -Original Message- From: Keith [mailto:[EMAIL PROTECTED] Sent: Monday, May 03, 2004 12:12 PM To: Tag Libraries Users List Subject: Re: whitespace inside but outside inserted in to output I've noticed that JSP never suppress

Re: whitespace inside but outside inserted in to output

2004-05-03 Thread Keith
I've noticed that JSP never suppresses any whitespace at all outside the < > characters. I'm doing HTML output, so this doesn't effect me to much in the final output. Looking at my resulting HTML source sure is an eyesore, though. Especially when I use optional HTML attributes. Below is a sni

RE: whitespace inside but outside inserted in to output

2004-05-03 Thread Morrow, Steve D.
I don't disagree with your viewpoint (a 300-character line can be yucky to read); I'm just saying I would have expected the space and am interested to know if the different implementations handle this differently. > -Original Message- > From: Andreas Schildbach [mailto:[EMAIL PROTECTED] >

Re: whitespace inside but outside inserted in to output

2004-05-03 Thread Andreas Schildbach
Morrow, Steve D. wrote: I would have expected the space. I thought there is no sense in putting any text between and . When should it show up? Suppressing the whitespace at this point would ease indenting choose constructs. If I want no whitespace at all, with the current implementation I hav

RE: whitespace inside but outside inserted in to output

2004-05-03 Thread Morrow, Steve D.
I would have expected the space. Do the different versions behave differently with respect to this? > -Original Message- > From: Andreas Schildbach [mailto:[EMAIL PROTECTED] > Sent: Monday, May 03, 2004 10:22 AM > To: [EMAIL PROTECTED] > Subject: whitespace inside but outside > inserte

whitespace inside but outside inserted into output

2004-05-03 Thread Andreas Schildbach
Hello everyone, With the Jakarta JSTL implementation 1.10, I discovered the following behaviour: Any whitespace inside but outside or is inserted into the output stream. An example: X Y would result in "X Y" instead of the expected "XY". Regards, Andreas ---