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
char * predefined[] = {"lt", "gt", "amp", "quot", "apos"};
36
int Insert_Name(char * name, int lgth);
37
int ASCII_Lookup_or_Insert_Name(char * name, int lgth);
38
int UTF8_Lookup_or_Insert_Name(char * name, int lgth);
39
int ASCII_Lookup_or_Insert_Nmtoken(char * name, int lgth);
40
int UTF8_Lookup_or_Insert_Nmtoken(char * name, int lgth);
42
char * Get_UTF8_name(int nameID);
43
int Get_UTF8_lgth(int nameID);
45
char * Get_UTF8_nmtoken(int nmtokenID);
46
int Get_UTF8_nmtoken_lgth(int nmtokenID);
48
char * ReserveSymbolSpace(int u8_lgth);
49
int LookupOrInsertReserved();
50
int LookupOrInsertReserved_nmtoken();
53
vector<Name_Data> UTF8NameTable;
54
vector<Name_Data> UTF8NmtokenTable;
56
hash_map<const char *, int, hash<const char *>, eqstr > UTF8NameMap;
57
hash_map<const char *, int, hash<const char *>, eqstr > UTF8NmtokenMap;
59
int globalNmtokenCount;
60
// vector<char *> UTF8NameTable;
64
StringPool<4096,100> pool;