From Adobe's GETTING STARTED WITH ADOBE INDESIGN CS5.5 PLUG-IN DEVELOPMENT (page 112):
In InDesign CS5, the Export as XHTML/Dreamweaver feature is implemented completely using ExtendScript. Export as XHTML/Dreamweaver is not distributed as a traditional InDesign plug-in; instead, it is installed as a folder containing several ExtendScript binaries, within the InDesign scripts folder located in /Scripts/export as XHTML. The source code for Export as XHTML is included in /source/public/components/xhtmlexport.
However, at the beginning of that chapter (named Feature Development with Scripting), there is a notice saying:
Chapter Update Status
CS5.5 Unchanged Content not guaranteed to be current.
Indeed, I can find neither the binaries nor the source for the export as XHTML script as neither the <InDesignInstallFolder>/Scripts/export as XHTML
folder nor the <SDK>/source/public/components/xhtmlexport
folder exist in the CS5.5 versions of InDesign and the SDK.
(I got the SDK from here.)
Does anyone know where I can find the source code for the export as XHTML script?