From e9ae80694875f869892f13f4fcaf1170a00dea41 Mon Sep 17 00:00:00 2001 From: toma Date: Wed, 25 Nov 2009 17:56:58 +0000 Subject: Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- quanta/parsers/dtd/dtdparser.h | 55 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 quanta/parsers/dtd/dtdparser.h (limited to 'quanta/parsers/dtd/dtdparser.h') diff --git a/quanta/parsers/dtd/dtdparser.h b/quanta/parsers/dtd/dtdparser.h new file mode 100644 index 00000000..b5b66d01 --- /dev/null +++ b/quanta/parsers/dtd/dtdparser.h @@ -0,0 +1,55 @@ +/*************************************************************************** + dtdparser.h - description + ------------------- + begin : Sun Oct 19 16:47:20 EEST 2003 + copyright : (C) 2003 Andras Mantia + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; version 2 of the License. * + * * + ***************************************************************************/ +#ifndef DTDPARSER_H +#define DTDPARSER_H + +//qt includes +#include + +//forward declarations +class KURL; +class QString; +struct Attribute; + +/** libxml2 based XML DTD parser and DTEP creation class*/ +class DTDParser { +public: + DTDParser(const KURL& dtdURL, const QString &dtepDir); + ~DTDParser(); + QString dirName(); + /** + * Parse the DTD file. + * @param targetDir the directory of the destination DTEP. If empty, a dialog is shown to configure the destination. + * @param entitiesOnly if true, only the entities are extracted from the DTD into the entities.tag file + * @return true on success, false if some error happened + */ + bool parse(const QString &targetDir = QString::null, bool entitiesOnly = false); + +protected: + void writeDescriptionRC(); + +private: + KURL m_dtdURL; + QString m_dtepDir; + QString m_name; + QString m_nickName; + QString m_doctype; + QString m_dtdURLLine; + bool m_caseSensitive; + QString m_defaultExtension; + QDict m_tags; +}; + +#endif -- cgit v1.2.1