Future of some functions in the class KCharsets
Nicolas Goutte
nicolasg at snafu.de
Mon Sep 4 20:30:06 BST 2006
On Monday 04 September 2006 13:04, Frans Englich wrote:
> On Sunday 03 September 2006 11:40, Thiago Macieira wrote:
> > Nicolas Goutte wrote:
> > >As the functions are not related to QTextCodec and as the KCharsets
> > > class has changed its main purpose since Qt2/KDE2, I intend to move
> > > them out in they own class.
> > >
> > >I propose the name KEntity for that class. (I have chosen the singular
> > > form, as there is already a file entities.c which is related.)
> >
> > Make that KHtmlEntity, since they are HTML-specific (except for < and
> > &, which come from XML).
>
> In what way is it HTML-specific?
The files kdelibs/kdecore/kentities.* defines only the HTML set of entities.
And that is the code that is called by KCharsets::fromEntity
As for KCharsets::toEntity it generates only the numerical references, so it
can be quite anything from SGML on (e.g. HTML or DocBook).
> Isn't it only XML-specific?
XML does only defines 5 named entities: < > & " '
> If it
> recognizes/uses HTML-specific entities such as nbsp, I think it's
> HTML-specific.
Yes.
>
> "entity" is also a very broad name(e.g, not XML/HTML specific), and in
> either case there are other types of entities than characters(that this
> class does not handle). The class neither is or represent an
> entity/character reference.
>
> I would call it something involving "character reference" since that's what
> it do. Something like KCharacterReferenceHelper, but not so long..
>
> http://www.w3.org/TR/REC-xml/#sec-references
Yes, that is also something that I have understood by thinking about this
thread (somewhen between yesterday afternoon and this morning). I had thought
about "character reference" too but that too could be non-HTML (e.g. Qt's
class QCharRef .)
>
>
> Cheers,
>
> Frans
Have a nice day!
More information about the kde-core-devel
mailing list