You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Michael Wechner <mi...@wyona.com> on 2005/11/28 16:56:18 UTC

not closing "empty" tags with xhtml serializer

Hi

Some Browsers don't like closed tags, like for instance

<iframe/>

but they don't mind

<iframe> </iframe>

The problem is that the xhtml serializer is closing "empty" tags.

(I am aware that the html serializer would be a workaround, but I want 
to serialize
the page as xhtml and not as html.)

Is it possible to configure the xhtml serializer to leave them open?

Somehow I have the feeling that this questions was asked before, but 
cannot find it
anymore and if there is a solution or not.

Any hint is appreciated

Thanks

Michi

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: not closing "empty" tags with xhtml serializer

Posted by Michael Wechner <mi...@wyona.com>.
Tim Williams wrote:

>On 11/28/05, Michael Wechner <mi...@wyona.com> wrote:
>  
>
>>Hi
>>
>>Some Browsers don't like closed tags, like for instance
>>
>><iframe/>
>>
>>but they don't mind
>>
>><iframe> </iframe>
>>
>>The problem is that the xhtml serializer is closing "empty" tags.
>>
>>(I am aware that the html serializer would be a workaround, but I want
>>to serialize
>>the page as xhtml and not as html.)
>>
>>Is it possible to configure the xhtml serializer to leave them open?
>>
>>Somehow I have the feeling that this questions was asked before, but
>>cannot find it
>>anymore and if there is a solution or not.
>>
>>Any hint is appreciated
>>
>>Thanks
>>
>>Michi
>>    
>>
>
>http://marc.theaimsgroup.com/?t=108001750800003&r=1&w=2
>
>Not sure if it helps or not...
>  
>

thanks for the hint

Michi

>--tim
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: not closing "empty" tags with xhtml serializer

Posted by Tim Williams <wi...@gmail.com>.
On 11/28/05, Michael Wechner <mi...@wyona.com> wrote:
> Hi
>
> Some Browsers don't like closed tags, like for instance
>
> <iframe/>
>
> but they don't mind
>
> <iframe> </iframe>
>
> The problem is that the xhtml serializer is closing "empty" tags.
>
> (I am aware that the html serializer would be a workaround, but I want
> to serialize
> the page as xhtml and not as html.)
>
> Is it possible to configure the xhtml serializer to leave them open?
>
> Somehow I have the feeling that this questions was asked before, but
> cannot find it
> anymore and if there is a solution or not.
>
> Any hint is appreciated
>
> Thanks
>
> Michi

http://marc.theaimsgroup.com/?t=108001750800003&r=1&w=2

Not sure if it helps or not...
--tim

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: not closing "empty" tags with xhtml serializer

Posted by Antonio Gallardo <ag...@agssa.net>.
Michael Wechner wrote:

> Antonio Gallardo wrote:
>
>>
>>
>> BTW, This is a old good know bug. It had been around for more than a 
>> year. I wonder why this is not just switch the default serializer.
>
>
>
> what do you mean?

I mean: let's make the newer serializer the default serializer. The 
current default serializer seems to be broken for long time. If this 
assertion is not true, then this thread was unnecesary, right? ;-).

>
> btw, I have added the iframe tag to the list of the XHTML serializer 
> of 2.1.X. I guess this also needs to be done for the trunk, right?

Yep. Please commit to the trunk too.

Thanks to you.

Best Regards,

Antonio Gallardo.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: not closing "empty" tags with xhtml serializer

Posted by Upayavira <uv...@odoko.co.uk>.
Michael Wechner wrote:
> Antonio Gallardo wrote:
> 
>>
>>
>> BTW, This is a old good know bug. It had been around for more than a
>> year. I wonder why this is not just switch the default serializer.
> 
> 
> 
> what do you mean?
> 
> btw, I have added the iframe tag to the list of the XHTML serializer of
> 2.1.X. I guess this also needs to be done for the trunk, right?

yes, please do.

Upayavira

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: not closing "empty" tags with xhtml serializer

Posted by Michael Wechner <mi...@wyona.com>.
Antonio Gallardo wrote:

>
>
> BTW, This is a old good know bug. It had been around for more than a 
> year. I wonder why this is not just switch the default serializer.


what do you mean?

btw, I have added the iframe tag to the list of the XHTML serializer of 
2.1.X. I guess this also needs to be done for the trunk, right?

Thanks

Michi

>
> Best Regards,
>
> Antonio Gallardo.
>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>


-- 
Michael Wechner
Wyona      -   Open Source Content Management   -    Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
michael.wechner@wyona.com                        michi@apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: not closing "empty" tags with xhtml serializer

Posted by Antonio Gallardo <ag...@agssa.net>.
Michael Wechner wrote:

> Upayavira wrote:
>
>> Michael Wechner wrote:
>>  
>>
>>> Upayavira wrote:
>>>
>>>   
>>>
>>>> Michael Wechner wrote:
>>>>
>>>>
>>>>     
>>>>
>>>>> Hi
>>>>>
>>>>> Some Browsers don't like closed tags, like for instance
>>>>>
>>>>> <iframe/>
>>>>>
>>>>> but they don't mind
>>>>>
>>>>> <iframe> </iframe>
>>>>>
>>>>> The problem is that the xhtml serializer is closing "empty" tags.
>>>>>
>>>>> (I am aware that the html serializer would be a workaround, but I 
>>>>> want
>>>>> to serialize
>>>>> the page as xhtml and not as html.)
>>>>>
>>>>> Is it possible to configure the xhtml serializer to leave them open?
>>>>>
>>>>> Somehow I have the feeling that this questions was asked before, but
>>>>> cannot find it
>>>>> anymore and if there is a solution or not.
>>>>>
>>>>> Any hint is appreciated
>>>>>  
>>>>>       
>>>>
>>>> Have you tried the serializer in the serializer block?
>>>>
>>>>     
>>>
>>> I guess that's the one which I am using:
>>>
>>> src/blocks/serializers/java/org/apache/cocoon/components/serializers/XHTMLSerializer.java 
>>>
>>>
>>>
>>>   
>>>
>>>> If that doesn't
>>>> work, it might be easier to fix than the core cocoon one.
>>>>
>>>>
>>>>     
>>>
>>> you mean adding "iframe" to
>>>
>>>
>>> if ((local.equalsIgnoreCase("textarea")) ||
>>>               (local.equalsIgnoreCase("script")) ||
>>>               (local.equalsIgnoreCase("style"))) {
>>>
>>> ?
>>>   
>>
>>
>> Yeah, that kinda thing!
>>
>> If iframe is another one of those cases, then it makes sense to add it
>> to that list and commit it.
>>  
>>
>
> ok, will do so. Whereas I think it would make sense to make this list 
> configurable within
> the map:components declaration. On the other hand the list is not 
> endless ;-) WDYT?


Since the list is not endless, then does not make sense to make it  
configurable. Better, please do a small research of all the tags that 
have the same behavior. WDYT?

BTW, This is a old good know bug. It had been around for more than a 
year. I wonder why this is not just switch the default serializer.

Best Regards,

Antonio Gallardo.

>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: not closing "empty" tags with xhtml serializer

Posted by Michael Wechner <mi...@wyona.com>.
Upayavira wrote:

>Michael Wechner wrote:
>  
>
>>Upayavira wrote:
>>
>>    
>>
>>>Michael Wechner wrote:
>>> 
>>>
>>>      
>>>
>>>>Hi
>>>>
>>>>Some Browsers don't like closed tags, like for instance
>>>>
>>>><iframe/>
>>>>
>>>>but they don't mind
>>>>
>>>><iframe> </iframe>
>>>>
>>>>The problem is that the xhtml serializer is closing "empty" tags.
>>>>
>>>>(I am aware that the html serializer would be a workaround, but I want
>>>>to serialize
>>>>the page as xhtml and not as html.)
>>>>
>>>>Is it possible to configure the xhtml serializer to leave them open?
>>>>
>>>>Somehow I have the feeling that this questions was asked before, but
>>>>cannot find it
>>>>anymore and if there is a solution or not.
>>>>
>>>>Any hint is appreciated
>>>>  
>>>>        
>>>>
>>>Have you tried the serializer in the serializer block?
>>>
>>>      
>>>
>>I guess that's the one which I am using:
>>
>>src/blocks/serializers/java/org/apache/cocoon/components/serializers/XHTMLSerializer.java
>>
>>
>>    
>>
>>>If that doesn't
>>>work, it might be easier to fix than the core cocoon one.
>>> 
>>>
>>>      
>>>
>>you mean adding "iframe" to
>>
>>
>>if ((local.equalsIgnoreCase("textarea")) ||
>>               (local.equalsIgnoreCase("script")) ||
>>               (local.equalsIgnoreCase("style"))) {
>>
>>?
>>    
>>
>
>Yeah, that kinda thing!
>
>If iframe is another one of those cases, then it makes sense to add it
>to that list and commit it.
>  
>

ok, will do so. Whereas I think it would make sense to make this list 
configurable within
the map:components declaration. On the other hand the list is not 
endless ;-) WDYT?

Thanks

Michi

>Regards, Upayavira
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: not closing "empty" tags with xhtml serializer

Posted by Upayavira <uv...@odoko.co.uk>.
Michael Wechner wrote:
> Upayavira wrote:
> 
>> Michael Wechner wrote:
>>  
>>
>>> Hi
>>>
>>> Some Browsers don't like closed tags, like for instance
>>>
>>> <iframe/>
>>>
>>> but they don't mind
>>>
>>> <iframe> </iframe>
>>>
>>> The problem is that the xhtml serializer is closing "empty" tags.
>>>
>>> (I am aware that the html serializer would be a workaround, but I want
>>> to serialize
>>> the page as xhtml and not as html.)
>>>
>>> Is it possible to configure the xhtml serializer to leave them open?
>>>
>>> Somehow I have the feeling that this questions was asked before, but
>>> cannot find it
>>> anymore and if there is a solution or not.
>>>
>>> Any hint is appreciated
>>>   
>>
>>
>> Have you tried the serializer in the serializer block?
>>
> 
> I guess that's the one which I am using:
> 
> src/blocks/serializers/java/org/apache/cocoon/components/serializers/XHTMLSerializer.java
> 
> 
>> If that doesn't
>> work, it might be easier to fix than the core cocoon one.
>>  
>>
> 
> you mean adding "iframe" to
> 
> 
> if ((local.equalsIgnoreCase("textarea")) ||
>                (local.equalsIgnoreCase("script")) ||
>                (local.equalsIgnoreCase("style"))) {
> 
> ?

Yeah, that kinda thing!

If iframe is another one of those cases, then it makes sense to add it
to that list and commit it.

Regards, Upayavira

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: not closing "empty" tags with xhtml serializer

Posted by Michael Wechner <mi...@wyona.com>.
Upayavira wrote:

>Michael Wechner wrote:
>  
>
>>Hi
>>
>>Some Browsers don't like closed tags, like for instance
>>
>><iframe/>
>>
>>but they don't mind
>>
>><iframe> </iframe>
>>
>>The problem is that the xhtml serializer is closing "empty" tags.
>>
>>(I am aware that the html serializer would be a workaround, but I want
>>to serialize
>>the page as xhtml and not as html.)
>>
>>Is it possible to configure the xhtml serializer to leave them open?
>>
>>Somehow I have the feeling that this questions was asked before, but
>>cannot find it
>>anymore and if there is a solution or not.
>>
>>Any hint is appreciated
>>    
>>
>
>Have you tried the serializer in the serializer block?
>

I guess that's the one which I am using:

src/blocks/serializers/java/org/apache/cocoon/components/serializers/XHTMLSerializer.java

> If that doesn't
>work, it might be easier to fix than the core cocoon one.
>  
>

you mean adding "iframe" to


if ((local.equalsIgnoreCase("textarea")) ||
                (local.equalsIgnoreCase("script")) ||
                (local.equalsIgnoreCase("style"))) {

?

Thanks

Michi


>Regards, Upayavira
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: not closing "empty" tags with xhtml serializer

Posted by Upayavira <uv...@odoko.co.uk>.
Michael Wechner wrote:
> Hi
> 
> Some Browsers don't like closed tags, like for instance
> 
> <iframe/>
> 
> but they don't mind
> 
> <iframe> </iframe>
> 
> The problem is that the xhtml serializer is closing "empty" tags.
> 
> (I am aware that the html serializer would be a workaround, but I want
> to serialize
> the page as xhtml and not as html.)
> 
> Is it possible to configure the xhtml serializer to leave them open?
> 
> Somehow I have the feeling that this questions was asked before, but
> cannot find it
> anymore and if there is a solution or not.
> 
> Any hint is appreciated

Have you tried the serializer in the serializer block? If that doesn't
work, it might be easier to fix than the core cocoon one.

Regards, Upayavira

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org