[daisy] HtmlCleaner : strange case ?
christophe blin
cblin at tennaxia.com
Tue Nov 14 06:57:47 CST 2006
Thanks for the precision, I misunderstood with ul tag.
BTW, I still do not understand why the cleaning for
<p><ul><li><p>hello!</p></li></ul></p>
is
<ul><li/></ul><p>hello!</p>
If someone can point me why the p is out of the li at the end, I will be
glad.
Then, I also have a problem to understand why, in the Cleaner, new
SaxBuffer() and new ArrayList<StartElementInfo>() is done for every step ?
Other questions concerning this component (more important, the 2
previous are only for my deeper understanding) :
1. I would like to get rid off all the br tags and replace them with a p.
Eg: <li>this is <br/>crazy</li> by <li><p>this is </p><p>crazy</p></li>
Where should I implement this ? (in HtmlRepairer.Cleaner directly or
could I add another clean step without touching the code ?)
2. I would like to have required attributes.
How is it possible (more precisely, is it already possible and if not
how could I implement this) ?
Eg: want the 'id' attribute for every p in the html to be required
Thanks for your time
Regards,
chris
Jonathan Bennett a écrit :
>> -----Original Message-----
>> From: daisy-bounces at lists.cocoondev.org
>> [mailto:daisy-bounces at lists.cocoondev.org] On Behalf Of
>> christophe blin
>> Subject: Re: [daisy] HtmlCleaner : strange case ?
>>
>
>
>> <ul><li><p>hello!</p></li></ul>
>>
>> //coment: which, BTW, is not valid xhtml (from the stnadards,
>> li can not have p inside them).
>>
>
> What makes you think that? From the XHTML 1.0 Strict DTD
> (http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd):
>
> <!-- list item -->
>
> <!ELEMENT li %Flow;>
> <!ATTLIST li
> %attrs;
> >
>
> ...which means li can contain block or inline elements, including p.
>
> Jonathan Bennett
> Editor, Builder UK
>
> http://uk.builder.com/
>
>
> Builder UK is a CNET Networks Inc. property
>
> _______________________________________________
> daisy community mailing list
> Professional Daisy support: http://outerthought.org/site/services/daisy/daisysupport.html
> mail to: daisy at lists.cocoondev.org
> list information: http://lists.cocoondev.org/mailman/listinfo/daisy
>
>
--
_____________________________________________________________________
Tennaxia, www.tennaxia.com,
Pilotez vos obligations environnementales
_____________________________________________________________________
Siège social :
6, rue Léonard de Vinci - 53001 Laval Cedex -
Tél : 02 43 49 75 50 - Fax : 02 43 49 75 77
Agence Paris :
19, rue réaumur - 75003 Paris -
Tél : 01 42 77 04 19 - Fax : 08 25 19 19 61
Agence Lyon :
Parc du Chater - 63 rue de la garenne - 69340 FRANCHEVILLE -
Tél : 04 72 39 98 14 - Fax : 04 72 39 93 85
The information in this message sent by TENNAXIA is confidential
and may be legally privileged. It is intended solely for the
addressee(s). Access to this message by anyone else is unauthorized.
If you are not the intended recipient, please delete it and notify
the sender : any disclosure, copying, distribution or any action
taken or omitted to be taken in reliance on it, is prohibited and
may be unlawful.
More information about the daisy
mailing list