Open delphidabbler opened 1 year ago
Could either update or (more likely) provide as an additional option.
May need to change THTML
advanced record in UHTMLUtils
into an abstract static class and derive two new classes from it: TXHTMLTag
and THTML5Tag
.
These classes would differ only in how they render simple tags.
It would be better to rename THTML
as THTMLTag
, regardless of whether it is changed into a class, because that better describes what it does. Additionally, changing the name would aid in changing all current references to THTML
to TXHTMLTag
.
Although it would go against good OOP design, given the change would only be to the rendering of simple tags, maybe it would be much simpler to pass a parameter to the relevant method(s) to specify either XHTML or HTML5.
Rather than a Boolean typed parameter such as IsHTML5
, an enumerated type parameter would document intention better, such as:
type
THTMLVersion = (
XHTML,
HTML5
);
There's already the option to render annotated source code and units in XHTML. It would be useful to update this to HTML5.