Reformatting of html source problems

2002-06-26 Thread Dr. Hans M. Rupp

Hallo!

We have a general problem with publishing html with Cocoon. The core of
the problem is that a html page can be rendered differently with
different layouts of the otherwise identical html source code.

For example:

tr
td colspan=5 bgcolor=#ffimg height=5 width=1
src=b.gif/td
/tr
draws a 5 pix high line across the table

however

tr
td colspan=5 bgcolor=#ff
img height=5 width=1 src=b.gif
/td
/tr

draws a line which has the height single line of text, because of
the line break.

I have noticed that at some points the html serializer does introduce
the extra line-feed at others not. Looking thru our stylessheet I have
not been able to figure out what might cause this behavior.
We have already tried a serializer which does not include linebreaks at
all, all the html source appears on a single line. But that might cause
problems at other points of the layout too and the html source output is
unreadable.

We get html pages from a design company and translate them to XSL and
XSP to run them on Cocoon. I would guess that this kind of workflow must
be rather common. So the problem must have turned up before.

Is there any general solution for this problem? How are we supposed to
deal with sophisticated input from html designers?


Many thanks,


Hans




Dr. Hans M. Rupp
danet Internet Solutions GmbH
Waldburgstr. 17-19
70563 Stuttgart
Germany

Fon +49 711 133 53 50
Fax +49 711 133 53 53

--



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

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




Re: Reformatting of html source problems

2002-06-26 Thread Christoph Gaffga

Hi !

perhaps it helps if you decrease the line-height (style-attribute):

tr
  td colspan=5 bgcolor=#ff style=font-size: 1px
img height=5 width=1 src=b.gif
  /td
/tr


Christoph Gaffga
[EMAIL PROTECTED]


- Original Message - 
From: Dr. Hans M. Rupp [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, June 26, 2002 12:11 PM
Subject: Reformatting of html source problems


 Hallo!
 
 We have a general problem with publishing html with Cocoon. The core of
 the problem is that a html page can be rendered differently with
 different layouts of the otherwise identical html source code.
 
 For example:
 
 tr
 td colspan=5 bgcolor=#ffimg height=5 width=1
 src=b.gif/td
 /tr
 draws a 5 pix high line across the table
 
 however
 
 tr
 td colspan=5 bgcolor=#ff
 img height=5 width=1 src=b.gif
 /td
 /tr
 
 draws a line which has the height single line of text, because of
 the line break.
 
 I have noticed that at some points the html serializer does introduce
 the extra line-feed at others not. Looking thru our stylessheet I have
 not been able to figure out what might cause this behavior.
 We have already tried a serializer which does not include linebreaks at
 all, all the html source appears on a single line. But that might cause
 problems at other points of the layout too and the html source output is
 unreadable.
 
 We get html pages from a design company and translate them to XSL and
 XSP to run them on Cocoon. I would guess that this kind of workflow must
 be rather common. So the problem must have turned up before.
 
 Is there any general solution for this problem? How are we supposed to
 deal with sophisticated input from html designers?
 
 
 Many thanks,
 
 
 Hans
 
 
 
 
 Dr. Hans M. Rupp
 danet Internet Solutions GmbH
 Waldburgstr. 17-19
 70563 Stuttgart
 Germany
 
 Fon +49 711 133 53 50
 Fax +49 711 133 53 53
 
 --
 
 
 
 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html
 
 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. http://xml.apache.org/cocoon/faq/index.html

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




RE: Reformatting of html source problems

2002-06-26 Thread Morgan Roderick

Is there any general solution for this problem?
This is a known browser problem that has been well documented at several
sources.

For a quick fix, try adding this to the head section of your html
output.

style
td img{
display: block;
}
/style

One of the best articles I've read on the subject is this one by the
brilliant Eric A. Meyer:
http://developer.netscape.com/evangelism/docs/articles/img-table/


How are we supposed to deal with sophisticated input from html
designers?
Get the designers up to speed on browser issues and CSS, maybe even
XSLT, so you can focus on building the site, instead of hunting down
browser bugs.

/Morgan Roderick




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

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




RE: Reformatting of html source problems

2002-06-26 Thread Niklas Lindström
Title: RE: Reformatting of html source problems






Hello!


I ran into this problem when I first started experimenting with Cocoon (2). I actually gave up because of this - due to lack of time mostly. I believe that the html serializer is slightly flawed - it should IMHO behave _exactly_ like the serializing triggered by the xsl:output method=html/-instruction in XSLT. All of the processors I've tried (e.g. XT, Saxon and Xalan) have worked as expected when used independently. I had a couple of webapps which used XML+XSLT - none of them looked good when serialized by Cocoon.

The general opinion seemed to be that this isn't an issue with Cocoon itself, since clients adhering to standards won't have a problem with this. The whitespace (linebreak) sensitive behaviour of most browsers is quite a problem though, and I do not believe that this approach helps promoting Cocoon.

I love Cocoon in all other aspects, and have an enormous respect for all those involved in developing it. It is a formidable application. But I didn't have the energy to prompt for change, so I gave up on using it - it was too big a risk for me to use it with this problem still remaining.

 (Another issue which is raised by this is when _needing_ to generate inline javascript (which might happen every now and then). There is (I have) simply too great a need for this whitespace control to accept the overruling behaviour of Coccon's serializer.)

My belief is that this can be solved by extending/writing a new serializer; perhaps one directly using the functionality in the XSLT-processor used. Might this be correct, and acceptably easy to do?


Best regards,
Niklas


(Who just unsubscribed to the list, due to my own inactivity. Typically, this made me begin to read it again, with renewed interest. :) I won't join again for a while though - no time. )



-Original Message-
From: Dr. Hans M. Rupp
To: [EMAIL PROTECTED]
Sent: 6/26/02 12:11 PM
Subject: Reformatting of html source problems


Hallo!


We have a general problem with publishing html with Cocoon. The core of
the problem is that a html page can be rendered differently with
different layouts of the otherwise identical html source code.


For example:


tr
td colspan=5 bgcolor=#ffimg height=5 width=1
src="b.gif/td
/tr
draws a 5 pix high line across the table


however


tr
td colspan=5 bgcolor=#ff
 img height=5 width=1 src="b.gif
/td
/tr


draws a line which has the height single line of text, because of
the line break.


I have noticed that at some points the html serializer does introduce
the extra line-feed at others not. Looking thru our stylessheet I have
not been able to figure out what might cause this behavior.
We have already tried a serializer which does not include linebreaks at
all, all the html source appears on a single line. But that might cause
problems at other points of the layout too and the html source output is
unreadable.


We get html pages from a design company and translate them to XSL and
XSP to run them on Cocoon. I would guess that this kind of workflow must
be rather common. So the problem must have turned up before.


Is there any general solution for this problem? How are we supposed to
deal with sophisticated input from html designers?



Many thanks,



Hans





Dr. Hans M. Rupp
danet Internet Solutions GmbH
Waldburgstr. 17-19
70563 Stuttgart
Germany


Fon +49 711 133 53 50
Fax +49 711 133 53 53


--




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


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