dominoGuru.com

Your Development & Design Resource

Defining an alternate DOCTYPE for IBM Lotus Notes Domino XPages

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.)


About the author: Chris Toohey

Thought Leadership, Web & Mobile Application Development, Solutions Integration, Technical Writing & Mentoring

A published developer and webmaster of dominoGuru.com, Chris Toohey specializes in platform application development, solutions integration, and evangelism of platform capabilities and best practices.



More from dominoGuru.com


dominoGuru.com is powered by IBM Notes Domino XPages & hosted by Prominic.NET

Contact Us

Use our Contact / Feedback form or one of these email addresses:

Creative Commons License

Except where otherwise noted, dominoGuru.com by Chris Toohey is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.