00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef EBOOKOPFTOKEN_H_INCLUDED
00011 #define EBOOKOPFTOKEN_H_INCLUDED
00012
00013 #include <boost/static_assert.hpp>
00014
00015 #include "EBOOKToken.h"
00016
00017 namespace libebook
00018 {
00019
00020 namespace EBOOKOPFToken
00021 {
00022
00023 enum
00024 {
00025 INVALID_TOKEN = 0,
00026 FIRST_TOKEN = EBOOKToken<EBOOKOPFParser>::FIRST_TOKEN,
00027
00028
00029 dc,
00030 opf,
00031 xml,
00032 xmlns,
00033
00034
00035 Contributor,
00036 Coverage,
00037 Creator,
00038 Date,
00039 Description,
00040 Format,
00041 Identifier,
00042 Language,
00043 Publisher,
00044 Relation,
00045 Rights,
00046 Source,
00047 Subject,
00048 Title,
00049 Type,
00050 contributor,
00051 coverage,
00052 creator,
00053 date,
00054 dc_metadata,
00055 description,
00056 format,
00057 guide,
00058 identifier,
00059 item,
00060 itemref,
00061 language,
00062 manifest,
00063 meta,
00064 metadata,
00065 package,
00066 publisher,
00067 reference,
00068 relation,
00069 rights,
00070 site,
00071 source,
00072 spine,
00073 subject,
00074 title,
00075 tour,
00076 tours,
00077 type,
00078 x_metadata,
00079
00080
00081 content,
00082 event,
00083 fallback,
00084 fallback_style,
00085 file_as,
00086 href,
00087 id,
00088 idref,
00089 lang,
00090 linear,
00091 media_type,
00092 name,
00093 required_modules,
00094 required_namespace,
00095 role,
00096 scheme,
00097 toc,
00098 unique_identifier,
00099 version,
00100
00101
00102 MIME_image,
00103 MIME_oeb,
00104 MIME_xhtml,
00105 _2_0,
00106 _3_0,
00107 aut,
00108 creation,
00109 edt,
00110 modification,
00111 no,
00112 publication,
00113 yes,
00114
00115 LAST_TOKEN
00116 };
00117
00118 BOOST_STATIC_ASSERT(EBOOKToken<EBOOKOPFParser>::LAST_TOKEN >= LAST_TOKEN);
00119
00120 enum Namespace
00121 {
00122 NS_dc = dc << 16,
00123 NS_opf = opf << 16,
00124 NS_xml = xml << 16,
00125 NS_xmlns = xmlns << 16
00126 };
00127
00128 }
00129
00130 int getOPFTokenId(const char *name, const char *ns = 0);
00131 int getOPFTokenId(const char *name, std::size_t nameLen, const char *ns, std::size_t nsLen);
00132 int getOPFTokenId(const char *name, std::size_t nameLen);
00133
00134 }
00135
00136 #endif // EBOOKOPFTOKEN_H_INCLUDED
00137
00138