1
/* symtab.h - XML Symbol Table Module
2
Copyright (c) 2008 Robert D. Cameron
3
Licensed to the public under the Open Software License 3.0.
4
Licensed to International Characters, Inc., under the Academic
11
#include "namechars.h"
12
#include "stringpool.h"
16
bool operator()(const char* s1, const char* s2) const
18
return strcmp(s1, s2) == 0;
28
const char * predefined[] = {"lt", "gt", "amp", "quot", "apos"};
35
int Insert_Name(const char * name, int lgth);
36
int ASCII_Lookup_or_Insert_Name(char * name, int lgth);
37
int UTF8_Lookup_or_Insert_Name(char * name, int lgth);
38
int ASCII_Lookup_or_Insert_Nmtoken(char * name, int lgth);
39
int UTF8_Lookup_or_Insert_Nmtoken(char * name, int lgth);
41
char * Get_UTF8_name(int nameID);
42
int Get_UTF8_lgth(int nameID);
44
char * Get_UTF8_nmtoken(int nmtokenID);
45
int Get_UTF8_nmtoken_lgth(int nmtokenID);
47
char * ReserveSymbolSpace(int u8_lgth);
48
int LookupOrInsertReserved();
49
int LookupOrInsertReserved_nmtoken();
52
vector<Name_Data> UTF8NameTable;
53
vector<Name_Data> UTF8NmtokenTable;
55
hash_map<const char *, int, hash<const char *>, eqstr > UTF8NameMap;
56
hash_map<const char *, int, hash<const char *>, eqstr > UTF8NmtokenMap;
58
int globalNmtokenCount;
59
// vector<char *> UTF8NameTable;
63
StringPool<4096,100> pool;