You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by Christian Merenda <ch...@oomega.net> on 2010/05/21 13:43:43 UTC

Enforcing the separation of opening and closing tag in Lenya's HTML output

Hello,

I've got a question regarding the transformation of empty HTML tags in 
XSL files to the final HTML output produced by Lenya. I've got the 
following line in my page.xsl file:

<a class="addthis_button_facebook"></a>

The produced HTML then finally looks like this:

<a class="addthis_button_facebook"/>

The problem is that e.g. Safari has problems with interpreting that 
XHTML code correctly - thus leading to incorrect assignments of CSS 
styles (because of a missing closing tag).

I would expect that Lenya does not modify the HTML code, i.e. delivering

<a class="addthis_button_facebook"></a>

to the end user. Can you please tell me whether and how this could be 
achieved by configuration? Is there any workaround to enforce the 
separation of opening and closing tag?

Cheers
Christian

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: Enforcing the separation of opening and closing tag in Lenya's HTML output

Posted by Richard Frovarp <rf...@apache.org>.
<mini-rant>The problem is that XHTML isn't XML. It's some messed up 
psuedo language that is more strict than HTML, but not as loose as 
XML</mini-rant>

The collapsed tags are equivalent in XML, but not XHTML. The pages are 
generated by running the content through Xalan, which sees that in XML 
the two options are equivalent, and so collapses the tags. I've used 
methods similar to Sac's suggestion below. You could try the xsl:output 
tag/method and set the type to HTML.

Richard

On 5/21/2010 7:27 AM, Sachin wrote:
> Hi Christian
>
> I think you can insert a space between the opening and closing tag to 
> achieve the separation.
> like:
> <a class="addthis_button_facebook">&#160;</a>
> or
> <a class="addthis_button_facebook"><i18n:text> </i18n:text></a>
>
> Regards
> Sac
>
> On Friday 21 May 2010 05:13 PM, Christian Merenda wrote:
>> Hello,
>>
>> I've got a question regarding the transformation of empty HTML tags 
>> in XSL files to the final HTML output produced by Lenya. I've got the 
>> following line in my page.xsl file:
>>
>> <a class="addthis_button_facebook"></a>
>>
>> The produced HTML then finally looks like this:
>>
>> <a class="addthis_button_facebook"/>
>>
>> The problem is that e.g. Safari has problems with interpreting that 
>> XHTML code correctly - thus leading to incorrect assignments of CSS 
>> styles (because of a missing closing tag).
>>
>> I would expect that Lenya does not modify the HTML code, i.e. delivering
>>
>> <a class="addthis_button_facebook"></a>
>>
>> to the end user. Can you please tell me whether and how this could be 
>> achieved by configuration? Is there any workaround to enforce the 
>> separation of opening and closing tag?
>>
>> Cheers
>> Christian
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
>> For additional commands, e-mail: user-help@lenya.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
> For additional commands, e-mail: user-help@lenya.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: Enforcing the separation of opening and closing tag in Lenya's HTML output

Posted by Sachin <sa...@techblue.co.uk>.
Hi Christian

I think you can insert a space between the opening and closing tag to 
achieve the separation.
like:
<a class="addthis_button_facebook">&#160;</a>
or
<a class="addthis_button_facebook"><i18n:text> </i18n:text></a>

Regards
Sac

On Friday 21 May 2010 05:13 PM, Christian Merenda wrote:
> Hello,
>
> I've got a question regarding the transformation of empty HTML tags in 
> XSL files to the final HTML output produced by Lenya. I've got the 
> following line in my page.xsl file:
>
> <a class="addthis_button_facebook"></a>
>
> The produced HTML then finally looks like this:
>
> <a class="addthis_button_facebook"/>
>
> The problem is that e.g. Safari has problems with interpreting that 
> XHTML code correctly - thus leading to incorrect assignments of CSS 
> styles (because of a missing closing tag).
>
> I would expect that Lenya does not modify the HTML code, i.e. delivering
>
> <a class="addthis_button_facebook"></a>
>
> to the end user. Can you please tell me whether and how this could be 
> achieved by configuration? Is there any workaround to enforce the 
> separation of opening and closing tag?
>
> Cheers
> Christian
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
> For additional commands, e-mail: user-help@lenya.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org