Invalid HTML Generation

XPages are generated using html4 STRICT DTD (http://www.w3.org/TR/html4/strict.dtd)

However, the generated source is full of warnings and errors when validation is attempted on even the simplest XPages.

Domino should generate VALID HTML. This is not a new problem, as Domino has never generated valid HTML. I was hoping 8.5 would be different. Especially with the new focus on XPages and the web.

Subject: notes rich text on an xpage can still be invalid HTML

If your xpage contains data from a notes rich text item then it could have invalid HTML in it. The same conversion is used as on “classic” web server. We are making some incremental improvements and intend to continue.

Subject: HelloWord Xpage fails validation

Sure, you can’t blame Domino for posting what it’s told to post in a rich text field.

But if you simply click NEW XPAGE, then type HelloWorld in the XPage and preview it, you’re going to get NINE errors and seven warnings when validated by the W3C tool.

HTML generation with Domino has always seemed hackish. Hopefully XPages and 8.5 can begin to correct that.

Subject: Have you tried the INI settings?

If I recall there are some INI settings in the readme that you can enable (e.g. closing tag generation). That should help Domino generate more valid HTML.

Can you post the errors here? It would at least raise awareness.

Subject: Errors

Here are the errors only, with no repetition.

document type does not allow element “INPUT” here; missing one of “P”, “H1”, “H2”, “H3”, “H4”, “H5”, “H6”, “PRE”, “DIV”, “ADDRESS” start-tag.

end tag for “HEAD” which is not finished.

character data is not allowed here.

there is no attribute “DJCONFIG”.

I’ll check the readme

Subject: the inis won’t affect xpage html generation

we’ll investigate.

Subject: GA release

The GA release of Xpages features some enhancements in this area.

1- Use of transitional instead of strict

The header is, by default:

This is because you might display some rich text that contains deprecated tags (FONT). But you can change the header through a property, defined at either the NSF or the server level.

2- HTML generation enhanced

We enhanced the HTML generation to avoid the validation errors/warnings. It even required some changes in the JSF implementation for shortags.

Almost all of warnings/errors have been removed, with the notable exception of the Dojo tags. This would require to create the Dojo controls using script instead of div tags with custom attributes. The change is too big/risky for 8.5

Hope this help.