1 /*
2 * Copyright (C) 2004-2010 Geometer Plus <contact@geometerplus.com>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 * 02110-1301, USA.
18 */
19
20 #ifndef __DOCBOOKREADER_H__
21 #define __DOCBOOKREADER_H__
22
23 #include <ZLXMLReader.h>
24
25 class DocBookReader : public ZLXMLReader {
26
27 public:
28 static std::string DTDDirectory;
29
30 public:
31 struct Tag {
32 const char *tagName;
33 int tagCode;
34 };
35
36 public:
37 //protected:
38 enum TagCode {
39 _ARTICLE,
40 _TITLE,
41 _ARTICLEINFO,
42 _AUTHOR,
43 _FIRSTNAME,
44 _OTHERNAME,
45 _SURNAME,
46 _AFFILIATION,
47 _ORGNAME,
48 _ULINK,
49 _ADDRESS,
50 _EMAIL,
51 _PUBDATE,
52 _RELEASEINFO,
53 _COPYRIGHT,
54 _YEAR,
55 _HOLDER,
56 _LEGALNOTICE,
57 _PARA,
58 _REVHISTORY,
59 _REVISION,
60 _REVNUMBER,
61 _DATE,
62 _AUTHORINITIALS,
63 _REVREMARK,
64 _ABSTRACT,
65 _SECT1,
66 _EMPHASIS,
67 _BLOCKQUOTE,
68 _CITETITLE,
69 _LINK,
70 _FOREIGNPHRASE,
71 _FIRSTTERM,
72 _FILENAME,
73 _ITEMIZEDLIST,
74 _LISTITEM,
75 _PART,
76 _PREFACE,
77 _CHAPTER,
78 _UNKNOWN
79 };
80
81 protected:
82 DocBookReader();
83
84 public:
85 ~DocBookReader();
86 const Tag *tags() const;
87
88 protected:
89 const std::vector<std::string> &externalDTDs() const;
90 };
91
DocBookReader()92 inline DocBookReader::DocBookReader() {}
~DocBookReader()93 inline DocBookReader::~DocBookReader() {}
94
95 #endif /* __DOCBOOKREADER_H__ */
96