parseDtd README From: ftp://ftp.techno.com/TechnoTeacher/parseDtd/README, 980508 parseDtd -- parses an SGML declaration set in the absence of a document. Written by Peter Newcomb (peter@techno.com) This package is based on the SP SGML parser, version 1.2.1, written by James Clark. SP can be found at www.jclark.com. Legal stuff: $Id: README,v 1.4 1998/05/08 17:07:51 peter Exp $ Copyright (C) 1997 ISOGEN International Corp. and TechnoTeacher, Inc. All Rights Reserved. This file and its associated materials are copyrighted material of ISOGEN International Corp. (ISOGEN) and TechnoTeacher, Inc. (TechnoTeacher). License to copy and use this file and its associated materials is granted to everyone, free of charge, with the following restrictions: (1) By your use, you acknowledge and agree that neither ISOGEN International Corp. nor TechnoTeacher, Inc. (we/us) provide these materials with any warranty whatsoever, that there is no implied warranty of any kind, and that you will indemnify, defend, and hold us harmless from any liability of any kind arising from your distribution or use of the materials for any purpose and in any context. (2) The ISOGEN and TechnoTeacher copyright statement must be maintained in any copies. (3) New materials derived from these materials must indicate their source, including references to the ISOGEN and TechnoTeacher web sites (www.isogen.com and www.techno.com). (4) These materials may not be sold in any form without the express written permission of ISOGEN and TechnoTeacher. [However, feel free to sell things you create from these materials as long as the things you create are truly different in function--we want to encourage people to learn from these materials and benefit from having learned--we just don't want others to sell what we're giving away.] -- The files that make up the package are: COPYING The legal stuff, once again. README This file. DtdParser.h The API to the DTD parser. The simplest application goes something like this: #include "DtdParser.h" int main() { DtdParser dtdParser; StringC sysid( dtdParser.convertInput( "filename.dtd")); ConstPtr< Dtd> dtd = dtdParser.parseDtd( sysid); return dtd.isNull(); } This application parses the declarations contained in "filename.dtd" and exits with a non-zero status only if the parse utterly failed (i.e., "filename.dtd" doesn't exist or doesn't contain parsable declarations). No error messages are reported. DtdParser.cxx The implementation of the DtdParser API. parseDtd.cxx An example application of DtdParser that parses a DTD and spits out information about the elements and attributes defined in it. inst.m4 inst.cxx Explicit template instantiation files. inst.cxx was generated from inst.m4 using SP's instmac.m4. Makefile.sub Makefile.dep Makefiles for building the parseDtd application as an SP subproject. -- To build parseDtd in a UNIX-style environment: 1. Extract parseDtd as a subdirectory of the top-level directory of SP 1.2.1 (or Jade10). 2. In the top-level directory, type "make XPROGDIRS=parseDtd", or "make PROGDIRS=parseDtd" to skip compiling nsgmls, sgmlnorm, spam, and spent. To build parseDtd.exe in a Win32/MSVC environment: [These directions were originally provided by Alfie Kirkpatrick (akirkpatrick@ims-global.com), but complain to me if you have trouble with them.] 1. Extract parseDtd as a subdirectory of the top-level directory of SP 1.2.1 (or Jade10). 2. Open the SP project and add a new Win32 console application as a subproject in the parseDtd directory. 3. Add DtdParser.cxx and parseDtd.cxx to the subproject. 4. Make a dependency link from parseDtd to lib. 5. Copy ALL the settings from spam to the parseDtd project, including SP_NAMESPACE and all the more subtle options, including changing /ML to /MD by selecting both multithread and DLL versions of the run-time routines from the standard header files. 6. Build.