summaryrefslogtreecommitdiffstats
path: root/quanta/parsers/dtd/dtd.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commite9ae80694875f869892f13f4fcaf1170a00dea41 (patch)
treeaa2f8d8a217e2d376224c8d46b7397b68d35de2d /quanta/parsers/dtd/dtd.h
downloadtdewebdev-e9ae80694875f869892f13f4fcaf1170a00dea41.tar.gz
tdewebdev-e9ae80694875f869892f13f4fcaf1170a00dea41.zip
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
Diffstat (limited to 'quanta/parsers/dtd/dtd.h')
-rw-r--r--quanta/parsers/dtd/dtd.h64
1 files changed, 64 insertions, 0 deletions
diff --git a/quanta/parsers/dtd/dtd.h b/quanta/parsers/dtd/dtd.h
new file mode 100644
index 00000000..45b0e213
--- /dev/null
+++ b/quanta/parsers/dtd/dtd.h
@@ -0,0 +1,64 @@
+/***************************************************************************
+ dtdparser.cpp - description
+ -------------------
+ begin : Tue Jul 30 15:26:20 EEST 2002
+ copyright : (C) 2002 by Jason P. Hanley <jphanley@buffalo.edu>
+ (C) 2002, 2003 Andras Mantia <amantia@kde.org>
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * 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; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef DTD_H
+#define DTD_H
+
+//qt includes
+#include <qdict.h>
+
+//app includes
+#include "qtag.h"
+
+class KURL;
+
+class DTD
+{
+
+public:
+ DTD(const KURL &dtdURL, const QString& dtepDir);
+ ~DTD();
+
+public:
+ QStringList getTags();
+ AttributeList* getTagAttributes(QString tag);
+ QStringList getTextCompletion(QString tag);
+ void printContents();
+ void writeTagFiles();
+ /** No descriptions */
+ bool parseDTD();
+
+private:
+ bool parseDTD(const KURL& url);
+ void parseDTDEntity(const QString &line);
+ void parseDTDElement(const QString &line);
+ void parseDTDAttlist(const QString &line);
+ void parseTagAttributeValues(const QString &name, QString *value);
+ void parseDTDReplace(QString *value);
+ void stripSpaces(QString *value);
+ void removeComments(QString &value);
+
+ QDict<QString> entities;
+ QDict<QString> elements;
+ QStringList tags;
+ QDict<AttributeList> tagAttributes;
+ /** From where to load the DTD file. */
+ KURL m_dtdURL;
+ QString m_dtepDir;
+};
+
+#endif