i try to validate a html content by WSection.IsValidXHTML method.
The method returns always false with error message: "The 'http://www.w3.org/XML/1998/namespace:lang' attribute is not declared."
Sample:
var wordFile = File.OpenRead("demo.docx");
var document = new WordDocument(wordFile, FormatType.Automatic);
var section = document.AddSection();
var html = $"<html><body><h1>test</h1></body></html>";
var isValid = section.Body.IsValidXHTML(html, XHTMLValidationType.Transitional, out var msg); //false with error message from above
what format is accepted by this validation?
no matter what HTML i do pass into this method, it returns the same error.