gui
[lbook_fbreader.git] / fbreader / src / formats / docbook / DocBookReader.cpp
blob98740f68aac93b4423899c8be598896e80100a6d
1 /*
2 * Copyright (C) 2004-2008 Geometer Plus <contact@geometerplus.com>
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.
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.
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.
20 #include <ZLStringUtil.h>
21 #include <ZLFile.h>
22 #include <ZLDir.h>
24 #include "DocBookReader.h"
26 static const ZLXMLReader::Tag TAGS[] = {
27 {"article", DocBookReader::_ARTICLE},
28 {"title", DocBookReader::_TITLE},
29 {"articleinfo", DocBookReader::_ARTICLEINFO},
30 {"author", DocBookReader::_AUTHOR},
31 {"firstname", DocBookReader::_FIRSTNAME},
32 {"othername", DocBookReader::_OTHERNAME},
33 {"surname", DocBookReader::_SURNAME},
34 {"affiliation", DocBookReader::_AFFILIATION},
35 {"orgname", DocBookReader::_ORGNAME},
36 {"ulink", DocBookReader::_ULINK},
37 {"address", DocBookReader::_ADDRESS},
38 {"email", DocBookReader::_EMAIL},
39 {"pubdate", DocBookReader::_PUBDATE},
40 {"releaseinfo", DocBookReader::_RELEASEINFO},
41 {"copyright", DocBookReader::_COPYRIGHT},
42 {"year", DocBookReader::_YEAR},
43 {"holder", DocBookReader::_HOLDER},
44 {"legalnotice", DocBookReader::_LEGALNOTICE},
45 {"para", DocBookReader::_PARA},
46 {"revhistory", DocBookReader::_REVHISTORY},
47 {"revision", DocBookReader::_REVISION},
48 {"revnumber", DocBookReader::_REVNUMBER},
49 {"date", DocBookReader::_DATE},
50 {"authorinitials", DocBookReader::_AUTHORINITIALS},
51 {"revremark", DocBookReader::_REVREMARK},
52 {"abstract", DocBookReader::_ABSTRACT},
53 {"sect1", DocBookReader::_SECT1},
54 {"emphasis", DocBookReader::_EMPHASIS},
55 {"blockquote", DocBookReader::_BLOCKQUOTE},
56 {"citetitle", DocBookReader::_CITETITLE},
57 {"link", DocBookReader::_LINK},
58 {"foreignphrase", DocBookReader::_FOREIGNPHRASE},
59 {"part", DocBookReader::_PART},
60 {"preface", DocBookReader::_PREFACE},
61 {"chapter", DocBookReader::_CHAPTER},
62 {0, DocBookReader::_UNKNOWN}
65 const ZLXMLReader::Tag *DocBookReader::tags() const {
66 return TAGS;
69 const std::vector<std::string> &DocBookReader::externalDTDs() const {
70 return EntityFilesCollector::instance().externalDTDs("docbook");