[yunqa.de] Re: DIHtmlParser: Empty Attribute Problem

  • From: Modularity <modularity@xxxxxxx>
  • To: yunqa@xxxxxxxxxxxxx
  • Date: Mon, 9 Apr 2012 10:15:09 +0200

Thank Ralf,

It would be great if you could add this parameter for the next update.

Regards,

John.


Le 6 avril 2012 22:15, Delphi Inspiration <delphi@xxxxxxxx> a écrit :

> On 06.04.2012 12:15, Modularity wrote:
>
> > I have the exact same problem, except I'm not using the Writer but
> > writing myself the output using the following code:
> >
> > case FHtmlParser.HtmlTag.TagID of
> >   ...
> >   // All other HTML codes
> >   else WriteLn(FHtmlParser.HtmlTag.GetCode(qtAlways));
> > end;
> >
> > And I get the following piece of code for empty attributes for images:
> >
> > '<img border="0" alt hspace="1" vspace="1" src="lib/find-replace.png">'
> >
> > I hope there is something I can do about it as this generates error with
> > the epub ebook validation tools.
>
> At the level of TDIHtmlTag level, there is nothing you can do without
> changing the DIHtmlParser source code. This should be possible without
> breaking backwards compatibility by adding to the TDIHtmlTag.GetCode()
> function an additional EmptyHtmlAttribValues argument which defaults to
> False. I will look into this in detail for the next version.
>
> Without changing sources, TDIHtmlWriterPlugin if of course a possible
> workaround, as you already mentioned: Write the tag, retrieve the data,
> and clear it again before you write the next tag.
>
> Ralf
> _______________________________________________
> Delphi Inspiration mailing list
> yunqa@xxxxxxxxxxxxx
> //www.freelists.org/list/yunqa
>
>
>
>
>

Other related posts: