dominoGuru.com
Your Development & Design Resource
Defining an alternate DOCTYPE for IBM Lotus Notes Domino XPages
10/07/2010 02:24 AM by Chris Toohey
While working on an iWebkit-based XPages framework, I had a need to change the loose.dtd HTML DOCTYPE to xhtml1-strict.dtd. Since setting that value is, quite frankly, one of the many features available to only the bravest of XPage spelunkers (read: there ain't no toggle/UI control for it in the XPage Design pane), I thought I'd share a quick how to.
The default DOCTYPE for an IBM Lotus Notes Domino XPage is:
<!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
For an iOS device (like the iPhone, iPod Touch, and iPad), I'll want the following DOCTYPE:
<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
To change the DOCTYPE, you simply add the following to the xsp.properties:
xsp.html.doctype=<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
Using the xsp.html.doctype
parameter in the
xsp.properties, you can quickly and rather easily change the IBM Lotus
Notes Domino-generated XPage DOCTYPE to meet your specific application
needs.
(NOTE: This xsp.properties change will affect all XPages for that specific NotesDatabase application.)