Thread: RE: [Htmlparser-user] Change in Layout
Brought to you by:
derrickoswald
From: <dha...@or...> - 2002-08-08 07:37:30
Attachments:
BDY.RTF
|
Hi, =A0 I would definitely appreciate converting the hard-coded end-of-line character with a detected end-of-line character from the system property. Currently I read the entire file and replace the hard-coded EOL with the system property EOL. =A0 I think the last EOL for toHTML() should be removed and instead all "\n" should be also parsed and reproduced exactly in the same way. Preserving layout shoudl be as important as performance. Also my feeling is that this tool will be used mostly by developers during development time and not at runtime(though it is always possible) and hence performance may not be an issue here. =A0 Please feel free to criticize my opinion. =A0 Typically my predicament is as follows : =A0 My team is=A0building a framework which is used by many projects in my organization. All the other projects create HTML with their own look-and-feel. To use the framework, they need to convert these files into a JSP(using a tool developed by my team). The tool apart from jsut changing the extension ;) also adds lots of JSP code and makes certain modifications to the HTML tags(not the presentation tags though). After the JSP is created if the layout changes, they will ahve to again spend time correcting this anomaly and will need to keep doing it everytime they change their HTML page or the tool is updated. Now I guess you can understand why I feel so strongly about maintaining layout. =A0 At the same time I am aware that the parser is here for everyone's need and will be driven accordingly. Hence am just presenting my point of view. Regards,=20 Dhaval Udani=20 Senior Analyst=20 M-Line, QPEG=20 OrbiTech Solutions Ltd.=20 +91-22-8290019 Extn. 1457=20 =A0 -----Original Message----- From: somik [mailto:so...@ya...] Sent: Thursday, August 08, 2002 12:33 PM To: htmlparser-user Cc: somik Subject: Re: [Htmlparser-user] Change in Layout =20 =20 =20 Hi Dhaval, =A0=A0=A0 This is actually a feature. If we try to give the exact same output as originally parsed, the performance of the parser could be compromised. Hence, giving=A0a corresponding output with slightly different formatting was chosen - in order to keep the design of the parser simple. =A0=A0=A0 However, related to this is an interesing issue - for which community feedback would be valuable. Currently, the formatting of toHTML() is rather arbitrary (in my opinion). By this I am particularly referring to the usage of end of line characters. Considering that=A0end of line characters differ=A0for each operating system - would it be a good idea to replace the hard-coded end of line characters with a the detected end of line char for a particular OS ? =A0 Regards, Somik ----- Original Message -----=20 From: dha...@or...=20 To: htm...@li...=20 Sent: Thursday, August 08, 2002 3:52 PM Subject: [Htmlparser-user] Change in Layout Hi, =20 I have an HTML page which I am rying to modify. During this process, I have come across a quirk. I don't know whether the problem is browser related or parser related. =20 The following HTML code : <TD align=3D"left" valign=3D"top" width=3D"18"><img src=3D"images/right_h1.gif" width=3D"18" height=3D"22"></TD> =20 gets converted to <TD align=3D"left" valign=3D"top" width=3D"18"> <img src=3D"images/right_h1.gif" width=3D"18" height=3D"22"> </TD> =20 This happens whenever I print back the parsed data using tag.toHTML(). =20 These 2 seem to be the same but presentation-wise I see different outputs. Is it write on part of tag.toHTML() to printout the EOL character at the end of the tag. =20 Regards,=20 =20 Dhaval Udani=20 Senior Analyst=20 M-Line, QPEG=20 OrbiTech Solutions Ltd.=20 +91-22-8290019 Extn. 1457=20 =20 =20 =20 =A0=A0 -----Original Message----- =A0=A0 From: somik [ mailto:so...@ya...] =A0=A0 Sent: Wednesday, August 07, 2002 10:26 AM =A0=A0 To: htmlparser-user =A0=A0 Cc: somik; htmlparser-developer =A0=A0 Subject: Re: [Htmlparser-user] Another Ill-Formed Example =A0=A0=20 =A0=A0=20 =20 =A0=A0=20 =A0=A0 Hi Claude, =A0=A0 This has been handled, related to the earlier fix. All potential =A0=A0 infinite loops have been removed, and there will be no more hangings =A0=A0 - only HTMLParserExceptions from now on. =A0=A0 There will be a release having all these fixes this weekend. =A0=A0=20 =A0=A0 Regards, =A0=A0 Somik =20 =A0=A0=A0=A0=A0 ----- Original Message -----=20 =A0=A0=A0=A0=A0 From: Claude Duguay=20 =A0=A0=A0=A0=A0 To: htm...@li...=20 =A0=A0=A0=A0=A0 Sent: Wednesday, August 07, 2002 3:35 AM =A0=A0=A0=A0=A0 Subject: [Htmlparser-user] Another Ill-Formed Examp= le =20 =20 =A0=A0=A0=A0=A0 Here's some markup we found in another document tha= t causes the =A0=A0=A0=A0=A0 HTMLParser to hang. =20 =A0=A0=A0=A0=A0 "<TITLE>KRP VALIDATION<PROCESS/TITLE>" =20 =A0=A0=A0=A0=A0 So far, we've had 4 documents cause our process to = come to a =A0=A0=A0=A0=A0 grinding halt. I would much prefer a policy of exce= ption throwing =A0=A0=A0=A0=A0 to hangs asap, followed by consideration of whether= unusual markup =A0=A0=A0=A0=A0 can be handled more elegantly in a subsequent phase= . Thanks to =A0=A0=A0=A0=A0 everyone, as always. =20 =A0=A0=A0=A0=A0=20 =20 =A0=A0=20 =20 =20 =20 =20 |
From: <dha...@or...> - 2002-08-12 04:44:58
Attachments:
BDY.RTF
|
=A0 I am not sure I fully understand. The other teams are creating HTML with their own look and feel. You are converting it to a JSP. Naturally the alignment would have changes by your additions itself. Now, if the original HTML is preserved in functionality but not in exact layout as it arrived, I did not understand how that causes a problem in your other teams. Are they reading your jsp file through some program ?=20 [Udani, Dhaval H.]=A0 I convert it into a JSP=A0by adding JSP code which does not alter the layout at all.=A0The HTML code I am adding is more on the line of some script functions, some event-handler code etc.The presentation is not touched with. In fact this is the primary requirement of this tool that the layout of the orginal HTML page should not be altered. =A0 For example, I decide that before <HTML> I want to put in some JSP code. Another instance is that after <HEAD> I want to add some <SCRIPT> code. =A0 Yet another instance would be that for <INPUT> tag I want to add the ONFOCUS event-handler=A0but if it already exists I want to only append to it. =A0 In this manner my tool never changes the presentation of the HTML page just adds some scripting and JSP code. =A0 I hope I have made my point clearer. =A0 Regards, Dhaval |
From: Somik R. <so...@ya...> - 2002-08-12 04:47:24
|
Hi Dhaval, I convert it into a JSP by adding JSP code which does not alter the layout at all. The HTML code I am adding is more on the line of some script functions, some event-handler code etc.The presentation is not touched with. In fact this is the primary requirement of this tool that the layout of the orginal HTML page should not be altered. For example, I decide that before <HTML> I want to put in some JSP code. Another instance is that after <HEAD> I want to add some <SCRIPT> code. Yet another instance would be that for <INPUT> tag I want to add the ONFOCUS event-handler but if it already exists I want to only append to it. =20 I understand - but by saying *HTML page should not be altered* , I am = assuming you mean that the elements should be the same functionally - = which is the case. Why should end of line characters make a difference, = because all the tags come in the same order as you'd expect. Regards, Somik |
From: <dha...@or...> - 2002-08-12 05:16:56
Attachments:
BDY.RTF
|
I understand - but by saying *HTML page should not be altered* , I am assuming you mean that the elements should be the same functionally - which is the case. Why should end of line characters make a difference, because all the tags come in the same order as you'd expect. [Udani, Dhaval H.]=A0 Initially even I thought the same but when I actually got to work with some pages and saw the difference online that I realized that the newline character plays a part in presentation as well.=20 =A0 The order may be the same=A0but the absence or presence of newline in certain cases can lead to a subsequent difference in the outlook. =A0 Moving to a different topic, the integration release has fixed the problem of "checked",=A0I believe. Is that correct? =A0 Regards, Somik =20 |
From: Somik R. <so...@ya...> - 2002-08-13 01:49:46
|
Hi Dhaval, The order may be the same but the absence or presence of newline in certain cases can lead to a subsequent difference in the outlook. I am intrigued by this. Can you tell me the specific cases ? Moving to a different topic, the integration release has fixed the problem of "checked", I believe. Is that correct? Yes - latest one has lots of fixes, and should be the most stable one = yet - primarily bcos the shameful infinite loop has problem has been = fixed :) Cheers, Somik |
From: <dha...@or...> - 2002-08-13 11:16:11
Attachments:
BDY.RTF
|
Hi Somik, I am intrigued by this. Can you tell me the specific cases ? [Udani, Dhaval H.]=A0 Assume a TEXTAREA tag as follows: <TEXTAREA=A0 name=3D"Comments">How are you?</TEXTAREA> =A0 as compared to =20 <TEXTAREA=A0 name=3D"Comments"> How are you? </TEXTAREA> =A0 If the form is submitted to a servlet=A0the latter will be received with 2 newline characters whereas the former will have none. For this particular case even tabs make a difference. =A0 Apart from that=20 <TD><IMG SRC=3D"today.gif"></TD> =A0 =20 <TD> <IMG SRC=3D"today.gif"> </TD> =A0 also can look different for certain gif sizes and cell sizes. =A0 Dhaval |
From: Raghavender S. <kin...@ho...> - 2002-08-15 16:39:05
|
Hi Somik, This is Raghav. the htmlparser which we are using, is this integrated with java swing. I beleive java swing also can render the html tags. Raghav >From: "Somik Raha" <so...@ya...> >Reply-To: htm...@li... >To: <htm...@li...> >Subject: Re: [Htmlparser-user] Change in Layout >Date: Tue, 13 Aug 2002 10:42:36 +0900 > >Hi Dhaval, >The order may be the same but the absence or presence of newline in >certain cases can lead to a subsequent difference in the outlook. > >I am intrigued by this. Can you tell me the specific cases ? > >Moving to a different topic, the integration release has fixed the >problem of "checked", I believe. Is that correct? > >Yes - latest one has lots of fixes, and should be the most stable one yet - >primarily bcos the shameful infinite loop has problem has been fixed :) > >Cheers, >Somik _________________________________________________________________ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx |
From: Somik R. <so...@ya...> - 2002-08-16 03:16:13
|
Hi Raghav, There was an aborted attempt at integrating it with swing - I gave = up, lost patience :) You are free to try if you are interested - if you manage to do it, = it would be a big contribution to the community. Cheers, Somik ----- Original Message -----=20 From: Raghavender Srimantula=20 To: htm...@li...=20 Sent: Friday, August 16, 2002 1:38 AM Subject: Re: [Htmlparser-user] Change in Layout Hi Somik, This is Raghav. the htmlparser which we are using, is this integrated = with=20 java swing. I beleive java swing also can render the html tags. Raghav >From: "Somik Raha" <so...@ya...> >Reply-To: htm...@li... >To: <htm...@li...> >Subject: Re: [Htmlparser-user] Change in Layout >Date: Tue, 13 Aug 2002 10:42:36 +0900 > >Hi Dhaval, >The order may be the same but the absence or presence of newline in >certain cases can lead to a subsequent difference in the outlook. > >I am intrigued by this. Can you tell me the specific cases ? > >Moving to a different topic, the integration release has fixed the >problem of "checked", I believe. Is that correct? > >Yes - latest one has lots of fixes, and should be the most stable one = yet -=20 >primarily bcos the shameful infinite loop has problem has been fixed = :) > >Cheers, >Somik _________________________________________________________________ MSN Photos is the easiest way to share and print your photos:=20 http://photos.msn.com/support/worldwide.aspx ------------------------------------------------------- This sf.net email is sponsored by: OSDN - Tired of that same old cell phone? Get a new here for FREE! https://www.inphonic.com/r.asp?r=3Dsourceforge1&refcode1=3Dvs3390 _______________________________________________ Htmlparser-user mailing list Htm...@li... https://lists.sourceforge.net/lists/listinfo/htmlparser-user |
From: Somik R. <so...@ya...> - 2002-08-10 08:22:39
|
Dhaval Udani wrote : My team is building a framework which is used by many projects in my organization. All the other projects create HTML with their own look-and-feel. To use the framework, they need to convert these files into a JSP(using a tool developed by my team). The tool apart from jsut changing the extension ;) also adds lots of JSP code and makes certain modifications to the HTML tags(not the presentation tags though). After the JSP is created if the layout changes, they will ahve to again spend time correcting this anomaly and will need to keep doing it everytime they change their HTML page or the tool is updated. Now I guess you can understand why I feel so strongly about maintaining layout. I am not sure I fully understand. The other teams are creating HTML with = their own look and feel. You are converting it to a JSP. Naturally the = alignment would have changes by your additions itself. Now, if the = original HTML is preserved in functionality but not in exact layout as = it arrived, I did not understand how that causes a problem in your other = teams. Are they reading your jsp file through some program ?=20 If you can give some more details, a clearer picture might emerge. Regards, Somik |