|
1 About the WBXML Token Dictionaries |
|
2 |
|
3 WBXML can use tokens to represent tag names, attribute names, attribute |
|
4 names combined with part or all of the attribute value, and part or all |
|
5 of an attribute value. |
|
6 |
|
7 The cXML code needs internal tables that map tokens to strings and strings |
|
8 to tokens. To simplify the generation of these tables (dictionaries) a |
|
9 simple data file giving token-string pairs is processed by a dictionary |
|
10 creator utility program which outputs the required .h and .c files. |
|
11 |
|
12 The dictionary creator program source code is in dict_creator.c and it |
|
13 is a stand-alone program. To compile it with the MS C compiler use the |
|
14 command: cl /Zi /W4 /WX dict_creator.c |
|
15 |
|
16 If you encounter following errors about lib.c can't be found or stdio.h is |
|
17 not found in path, you need to set up system var: |
|
18 |
|
19 INCLUDE: C:\progra~1\micros~3\VC98\Include |
|
20 LIB: C:\progra~1\micros~3\VC98\lib |
|
21 |
|
22 To get dict_creator usage info run dict_creator with no arguments. |
|
23 |
|
24 Files with extension ".dict" are data input files. |
|
25 |
|
26 Example runs: |
|
27 |
|
28 dict_creator xhtml_1_0.dict xhtml_1_0_dict.c nw_xhtml_xhtml_1_0_tokens.h |
|
29 dict_creator wml_1_3.dict wml_1_3_dict.c nw_wml1x_wml_1_3_tokens.h |
|
30 |
|
31 dict_creator si.dict si_dict.c si_dict.h |
|
32 |
|
33 |
|
34 You have to get through dict_creator without errors and then you have to |
|
35 get through the C compiler on the output. If the output doesn't compile, |
|
36 it may be because dict_creator did something wrong. Dict_creator has to |
|
37 make a few transformations on the input to create C variable names and it |
|
38 is possible (though we hope never encountered in use) that this produces |
|
39 output that won't compile. |
|
40 |
|
41 END |