You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by Keven Ages <ke...@fourthwallmedia.com> on 2006/05/30 18:11:38 UTC
Possible Lenya bug
I just noticed while creating a new template in Lenya that for some odd
reason div tags that have no content in them are ended (I'd imagine by
the XSLT processor).
For example
<div id="mainLogo"></div>
Is changed to:
<div id="mainLogo" />
</div>
If I put content inside the div it doesn't end it. This is a major
problem if you are using a lot of background images or container divs.
Keven Ages
Re: Possible Lenya bug
Posted by Jörn Nettingsmeier <po...@uni-duisburg.de>.
Keven Ages wrote:
> I just noticed while creating a new template in Lenya that for some odd
> reason div tags that have no content in them are ended (I’d imagine by
> the XSLT processor).
>
>
>
> For example
>
>
>
> <div id=”mainLogo”></div>
>
>
>
> Is changed to:
>
>
>
> <div id=”mainLogo” />
>
> </div>
>
>
>
> If I put content inside the div it doesn’t end it. This is a major
> problem if you are using a lot of background images or container divs.
by definition, <element></element> and <element/> are equivalent, so it
is definitely correct behaviour. the bug is in browsers, for example
mozilla gets all f%$§ed up when it encounters empty tags like <a
name="doh"/>.
for these browser bugs, there is the workaround that michael suggested.
if you want to have a layout-neutral filler, you can use the zero-width
space from unicode, which iirc is ‫. i don't know how older
browsers deal with this one, though.
hth,
jörn
--
"Open source takes the bullshit out of software."
- Charles Ferguson on TechnologyReview.com
--
Jörn Nettingsmeier, EDV-Administrator
Institut für Politikwissenschaft
Universität Duisburg-Essen, Standort Duisburg
Mail: pol-admin@uni-due.de, Telefon: 0203/379-2736
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org
Re: Possible Lenya bug
Posted by Michael Wechner <mi...@wyona.com>.
Keven Ages wrote:
>
> I just noticed while creating a new template in Lenya that for some
> odd reason div tags that have no content in them are ended (I’d
> imagine by the XSLT processor).
>
> For example
>
> <div id=”mainLogo”></div>
>
> Is changed to:
>
> <div id=”mainLogo” />
>
> </div>
>
> If I put content inside the div it doesn’t end it. This is a major
> problem if you are using a lot of background images or container divs.
>
agreed. It's not a bug but rather a feature of Cocoon, but yes, a
feature which can be annonying.
As Victoria is saying, one can put in a #160; (nbsp), but this isn't
always a good workaround.
IIRC another possibility is that one can actually configure within the
serializer, but I am not sure anymore.
Michi
>
> Keven Ages
>
--
Michael Wechner
Wyona - Open Source Content Management - Apache Lenya
http://www.wyona.com http://lenya.apache.org
michael.wechner@wyona.com michi@apache.org
+41 44 272 91 61
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org