RE: [xsl] XML-->HTML-->CHM

Subject: RE: [xsl] XML-->HTML-->CHM
From: "LJ" <ldongre@xxxxxxxxx>
Date: Tue, 1 Oct 2002 10:53:49 -0500
Hi Ganendra,

Download the HTML workshop from Microsoft website and use the 'hcc' , html
compiler to create the chm file. You will have to create a
.hpp file on the fly which should contain the name of the html file
compiled. I am attaching a sample of c++ code which will do some thing
similar.

Here I assume I have a XML document described by xmlDoc which then gets
transformed using an xsl into an html file and then compiled to a .chm file.

Hope this helps.

Laxmikant.


	MSXML2::IXMLDOMDocumentPtr      xslDoc;
	xslDoc.CreateInstance(__uuidof(MSXML2::DOMDocument));
	if (xslDoc) {
		xslDoc->load(_T("DigisonicsReport.xsl"));

		char        htmlFileName[_MAX_FNAME+1];
		sprintf(htmlFileName, "%s-%d.htm", "Report", studyID);
		_tofstream   os(htmlFileName);
		if (!os) {
			_tstringstream errlog;
			errlog << _T("CMyFilenameXlator::SaveToXMLFile Unable to save data to
file : <")
				<< TSTR(htmlFileName)
				<< _T("> ");
			throw errlog.str();
		}

		os << W2T(xmlDoc_->transformNode(xslDoc));
		os.close();

//
// Here is where we are creating a html compiler project file which needs to
be present for hcc to work.
//
		_tofstream hpos("Report.hhp");
		hpos << _T("[OPTIONS]\nBinary Index=No\nCompatibility=1.1 or later")
			<< _T("\nCompiled file=Report-") << studyID << _T(".chm")
			<< _T("\nDefault topic=") << TSTR(htmlFileName)
			<< _T("\nDisplay compile notes=No\nDisplay compile progress=No")
			<< _T("\nLanguage=0x409 English (United States)")
			<< _T("\n[FILES]\n") << TSTR(htmlFileName)
			<< _T("\n[INFOTYPES]\n");
		hpos.close();

// invoke the html compiler ...
		_tsystem(_T("hhc Report.hhp"));
		condorRef.AddReport(TSTR(htmlFileName));
	}
	else {
		throw _tstring(_T("Unable to Construct an XSL DOM object"));
	}
}

-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Satish, L.
Gnanendra
Sent: Tuesday, October 01, 2002 12:51 AM
To: 'xsl-list@xxxxxxxxxxxxxxxxxxxxxx'
Subject: [xsl] XML-->HTML-->CHM

Hello,
 I am a VC++ developer.
 Does anyone know of any libraries/tools to convert my DTD+XML+XSLT files to
(saved as)HTML in an automated way? Apache-Xalan lib is too huge to include
to my project...
 Also I would like to know if there is a automated way(tools) to convert
this generated HTML to .CHM (compiled help) file?

All these processes should happen in an automated way at the click of a
menu/button?

Help asap.

Thanx and rgds,
Gnanendra.
- - - - - - - Appended by Scientific-Atlanta, Inc. - - - - - - -
This e-mail and any attachments may contain information which is
confidential, proprietary, privileged or otherwise protected by law. The
information is solely intended for the named addressee (or a person
responsible for delivering it to the addressee). If you are not the intended
recipient of this message, you are not authorized to read, print, retain,
copy or disseminate this message or any part of it. If you have received
this e-mail in error, please notify the sender immediately by return e-mail
and delete it from your computer.

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread