You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ecs-user@jakarta.apache.org by Gordian Yuan <go...@gmail.com> on 2009/02/23 10:33:34 UTC

missing tag?

Hi all,

I am new to ecs, I write a assert like

assertEquals("<ul><li>Hello World</li></ul>", new UL().addElement(
                new LI("Hello World")).toString());

I expect "<ul><li>Hello World</li></ul>" but actual ecs generate
"<ul><li>Hello World</ul>", it's missing "</li>"

My question is how to add the missing "</li>" tag??

Any input will be great .. thank you

Gordian

Re: missing tag?

Posted by Gordian Yuan <go...@gmail.com>.
Hi Martin,

Thank you very much for the quick response and solution my problem ... Thank
you very much!

Gordian

On Mon, Feb 23, 2009 at 6:22 PM, Martin Kurz <in...@martinkurz.com> wrote:

> Hi Gordian,
>
> there are two packages for the creation of html elements in ecs:
>
> org.apache.ecs.html
>
> and
>
> org.apache.ecs.xhtml
>
> the first one (org.apache.ecs.html) is for html4, the second one for xhtml,
> html4 doesn't force closing tags for element, xhtml does. Simply use to the
> lowercase classes from xhtml-package, then you'll get the closing tags.
>
> Greetings,
>
> Martin
>
> Gordian Yuan schrieb:
>
>  Hi all,
>>
>> I am new to ecs, I write a assert like
>>
>> assertEquals("<ul><li>Hello World</li></ul>", new UL().addElement(
>>                new LI("Hello World")).toString());
>>
>> I expect "<ul><li>Hello World</li></ul>" but actual ecs generate
>> "<ul><li>Hello World</ul>", it's missing "</li>"
>>
>> My question is how to add the missing "</li>" tag??
>>
>> Any input will be great .. thank you
>>
>> Gordian
>>
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ecs-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: ecs-user-help@jakarta.apache.org
>
>

Re: missing tag?

Posted by Martin Kurz <in...@martinkurz.com>.
Hi Gordian,

there are two packages for the creation of html elements in ecs:

org.apache.ecs.html

and

org.apache.ecs.xhtml

the first one (org.apache.ecs.html) is for html4, the second one for 
xhtml, html4 doesn't force closing tags for element, xhtml does. Simply 
use to the lowercase classes from xhtml-package, then you'll get the 
closing tags.

Greetings,

Martin

Gordian Yuan schrieb:
> Hi all,
> 
> I am new to ecs, I write a assert like
> 
> assertEquals("<ul><li>Hello World</li></ul>", new UL().addElement(
>                 new LI("Hello World")).toString());
> 
> I expect "<ul><li>Hello World</li></ul>" but actual ecs generate
> "<ul><li>Hello World</ul>", it's missing "</li>"
> 
> My question is how to add the missing "</li>" tag??
> 
> Any input will be great .. thank you
> 
> Gordian
> 

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