This is my code:
Code: Select all
implement tryout
open core, xmlLite, xhtmlWriter
constants
filename8 : string = "xhmlLiteDemo8.html".
clauses
test() :-
OutFile8 = outputStream_file::create(filename8, stream::binary),
write(OutFile8, core::utf8),
OutFile8:close().
class predicates
write : (outputStream Output, core::codePage CodePageId).
clauses
write(Output, CodepageId) :-
XmlWriter = xhtmlWriter::new(),
XmlWriter:setOutput(Output, CodepageId),
XmlWriter:setProperty(indent, b_true),
XmlWriter:startHtml5(),
XmlWriter:writeAttributeString("lang","en"),
XmlWriter:writeEndElement(),
XmlWriter:writeEndDocument(),
XmlWriter:flush().
end implement tryout
<!DOCTYPE html>
<html lang="en" />
while expecting this:
<!DOCTYPE html>
<html lang="en">
</html>
What must be done to get the html closing tag?
Kind regards
Ben