Paul S. Person wrote:
<solprovider <at> apache.org> writes:
On 12/27/05, Paul S. Person <pspemail <at> earthlink.net> wrote:
When I Publish a document containing the lines
<ul>
<li>
<strong>strong</strong><em>em</em><cite>cite</cite><code>code</code>
</li>
</ul>
Which displays in BXE (except that, in BXE, "strong" would be bold, "em" in
italics, "cite" in italics, and "code", with my CSS, in monospaced courier
new) as
strongemcitecode
(that is, with no spaces between the elements).
After saving the page in and exiting from BXE, Submit and Publish /change
the file/ so that it looks like this:
<ul>
<li>
<strong>strong</strong>
<em>em</em>
<cite>cite</cite>
<code>code</code>
</li>
</ul>
and displays (again, "strong", "em", "cite" and "code" each has the proper
appearance) as
strong em cite code
(that is, with spaces between the elements).
I really have no idea what is going on. My best guess is that HTML converts
the newline characters inserted by Publish into spaces. Given the general
disarray of HTML (or XHTML files: it does not matter if all the tags above
are replaced with <xhtml:> or </xhtml:> equivalents) files, it makes sense
that plain text would work this way: any number of spaces or other white
space characters are replaced with a single space.
So, the problem appears to me to be that Lenya's Publish function is
introducing an unwelcome and unwanted reformatting to my document. I
know even less about how Lenya's Publish function works than I do
about HTML or CSS. And I don't know much about HTML or CSS at all.
I would like, if possible, a simple, clear statement as to whether the
problem can be corrected and, if so, how to do it. What I am looking
for is something on the order of "open file MAGIC.XSLT and insert the
line <xlst:insert-no-whitespace-of-any-kind-between-elements"> in the
"sane behavior" section". What I don't want is a referral to a multipage
reference manual or an endless regress of Web pages which may, or may
not, actually contain the answer to the question.
First, this is working as designed. And it is the design of every
browser, not Lenya, to convert all whitespace to a single space. If
you want newlines, you must use the BR or P or another tag. If you
want a single space, use any whitespace: all combinations of one or
more spaces, tabs, and newlines will be converted to one space. If
you want multiple spaces, use:
 
multiple times. If you want no whitespace, you must not include any
whitespace between the tags. You can prove this by creating and
opening a simple HTML file on your PC.
It really helps to learn basic HTML before developing websites. There
were many complaints in the early days of the Internet because the
standard two spaces between sentences was converted to a single space
for display. The English grammarists "created" a new standard (with a
single space between sentences) for "electronic writing", because
nobody has the power to change the HTML standard of converting all
whitespace to a single space.
First, I want to thank you for your response.
And for confirming how HTML works with regard to whitespace.
However, the question is not "how do I get HTML to ignore
whitespace" but rather "how do I prevent Lenya from inserting
white space when it publishes my page". Lenya undeniably inserts
newlines when the page is published. If Lenya did not insist
on moving the different elements to different lines in the file,
the browser would behave as I wish.
I confirmed this by using Wordpad to add or remove the newlines
manually and then reloading the page. Since the browser is working
correctly, there is no doubt that the problem lies with Lenya. Or
perhaps the problem lies with Cocoon. Or, for all I know, is required
behavior for translators (in which case no cure is possible). Part of
the problem is that learning HTML is not enough: CSS, XML, XHTML, XSL,
XSLT ... the list is endless and I am not likely to learn them all
quickly enough to solve this myself.
you might want to debug your pipelines by inserting <map:serialize
type="xml"/> into your pipelines to see where the whitespaces are being
entered.
HTH
Michi
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Michael Wechner
Wyona - Open Source Content Management - Apache Lenya
http://www.wyona.com http://lenya.apache.org
[EMAIL PROTECTED] [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]