KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > icl > saxon > style > StandardNames


1 package com.icl.saxon.style;
2 import com.icl.saxon.tree.AttributeCollection;
3 import com.icl.saxon.om.NamePool;
4 import com.icl.saxon.om.Namespace;
5
6 public class StandardNames {
7
8         public NamePool pool;
9
10     /**
11     * Well-known names used in XSLT processing
12     */

13
14         public int XML_SPACE;
15         public int XML_LANG;
16
17         public int XSL_APPLY_IMPORTS;
18         public int XSL_APPLY_TEMPLATES;
19         public int XSL_ATTRIBUTE;
20         public int XSL_ATTRIBUTE_SET;
21         public int XSL_CALL_TEMPLATE;
22         public int XSL_CHOOSE;
23         public int XSL_COMMENT;
24         public int XSL_COPY;
25         public int XSL_COPY_OF;
26         public int XSL_DECIMAL_FORMAT;
27         public int XSL_DOCUMENT;
28         public int XSL_ELEMENT;
29         public int XSL_FALLBACK;
30         public int XSL_FOR_EACH;
31         public int XSL_IF;
32         public int XSL_IMPORT;
33         public int XSL_INCLUDE;
34         public int XSL_KEY;
35         public int XSL_MESSAGE;
36         public int XSL_NUMBER;
37         public int XSL_NAMESPACE_ALIAS;
38         public int XSL_OTHERWISE;
39         public int XSL_OUTPUT;
40         public int XSL_PARAM;
41         public int XSL_PRESERVE_SPACE;
42         public int XSL_PROCESSING_INSTRUCTION;
43         public int XSL_SCRIPT;
44         public int XSL_SORT;
45         public int XSL_STRIP_SPACE;
46         public int XSL_STYLESHEET;
47         public int XSL_TEMPLATE;
48         public int XSL_TEXT;
49         public int XSL_TRANSFORM;
50         public int XSL_VALUE_OF;
51         public int XSL_VARIABLE;
52         public int XSL_WITH_PARAM;
53         public int XSL_WHEN;
54
55         public int SAXON_ASSIGN;
56         public int SAXON_DOCTYPE;
57         public int SAXON_ENTITY_REF;
58         public int SAXON_FUNCTION;
59         public int SAXON_GROUP;
60         public int SAXON_HANDLER;
61         public int SAXON_ITEM;
62         public int SAXON_OUTPUT;
63         public int SAXON_PREVIEW;
64         public int SAXON_SCRIPT;
65         public int SAXON_RETURN;
66         public int SAXON_WHILE;
67         
68         public int EXSLT_FUNC_FUNCTION;
69         public int EXSLT_FUNC_RESULT;
70         
71         public int ARCHIVE;
72         public int CASE_ORDER;
73         public int CDATA_SECTION_ELEMENTS;
74         public int COUNT;
75         public int DATA_TYPE;
76         public int DECIMAL_SEPARATOR;
77         public int DIGIT;
78         public int DISABLE_OUTPUT_ESCAPING;
79         public int DOCTYPE_PUBLIC;
80         public int DOCTYPE_SYSTEM;
81         public int ELEMENTS;
82         public int ENCODING;
83         public int EXCLUDE_RESULT_PREFIXES;
84         public int EXTENSION_ELEMENT_PREFIXES;
85         public int FILE;
86         public int FORMAT;
87         public int FROM;
88         public int GROUP_BY;
89         public int GROUPING_SEPARATOR;
90         public int GROUPING_SIZE;
91         public int HANDLER;
92         public int HREF;
93         public int ID;
94         public int IMPLEMENTS_PREFIX;
95         public int INDENT;
96         public int INFINITY;
97         public int LANG;
98         public int LANGUAGE;
99         public int LETTER_VALUE;
100         public int LEVEL;
101         public int MATCH;
102         public int MEDIA_TYPE;
103         public int METHOD;
104         public int MINUS_SIGN;
105         public int MODE;
106         public int NAME;
107         public int NAMESPACE;
108         public int NAN;
109         public int OMIT_XML_DECLARATION;
110         public int ORDER;
111         public int RESULT_PREFIX;
112         public int PATTERN_SEPARATOR;
113         public int PERCENT;
114         public int PER_MILLE;
115         public int PRIORITY;
116         public int SELECT;
117         public int SRC;
118         public int STANDALONE;
119         public int STYLESHEET_PREFIX;
120         public int TERMINATE;
121         public int TEST;
122         public int USE;
123         public int USE_ATTRIBUTE_SETS;
124         public int USER_DATA;
125         public int VALUE;
126         public int VERSION;
127         public int ZERO_DIGIT;
128         
129         public int SAXON_ALLOW_AVT;
130         public int SAXON_ASSIGNABLE;
131         public int SAXON_DISABLE_OUTPUT_ESCAPING;
132         public int SAXON_OMIT_META_TAG;
133         public int SAXON_CHARACTER_REPRESENTATION;
134         public int SAXON_INDENT_SPACES;
135         public int SAXON_NEXT_IN_CHAIN;
136                         
137         public int XSL_EXCLUDE_RESULT_PREFIXES;
138         public int XSL_EXTENSION_ELEMENT_PREFIXES;
139         public int XSL_USE_ATTRIBUTE_SETS;
140         public int XSL_VERSION;
141                 
142         
143     public StandardNames(NamePool namePool) {
144         pool = namePool;
145     }
146
147     public void allocateNames() {
148     
149         XML_SPACE = 0xfffff & pool.allocate("xml", Namespace.XML, "space");
150         XML_LANG = 0xfffff & pool.allocate("xml", Namespace.XML, "lang");
151         
152         XSL_APPLY_IMPORTS = 0xfffff & pool.allocate("xsl", Namespace.XSLT, "apply-imports");
153         XSL_APPLY_TEMPLATES = 0xfffff & pool.allocate("xsl", Namespace.XSLT, "apply-templates");
154         XSL_ATTRIBUTE = 0xfffff & pool.allocate("xsl", Namespace.XSLT, "attribute");
155         XSL_ATTRIBUTE_SET = 0xfffff & pool.allocate("xsl", Namespace.XSLT, "attribute-set" );
156         XSL_CALL_TEMPLATE = 0xfffff & pool.allocate("xsl", Namespace.XSLT, "call-template");
157         XSL_CHOOSE = 0xfffff & pool.allocate("xsl", Namespace.XSLT, "choose");
158         XSL_COMMENT = 0xfffff & pool.allocate("xsl", Namespace.XSLT, "comment");
159         XSL_COPY = 0xfffff & pool.allocate("xsl", Namespace.XSLT, "copy");
160         XSL_COPY_OF = 0xfffff & pool.allocate("xsl", Namespace.XSLT, "copy-of");
161         XSL_DECIMAL_FORMAT= 0xfffff & pool.allocate("xsl", Namespace.XSLT, "decimal-format");
162         XSL_DOCUMENT = 0xfffff & pool.allocate("xsl", Namespace.XSLT, "document");
163         XSL_ELEMENT = 0xfffff & pool.allocate("xsl", Namespace.XSLT, "element");
164         XSL_FALLBACK = 0xfffff & pool.allocate("xsl", Namespace.XSLT, "fallback");
165         XSL_FOR_EACH = 0xfffff & pool.allocate("xsl", Namespace.XSLT, "for-each");
166         XSL_IF = 0xfffff & pool.allocate("xsl", Namespace.XSLT, "if");
167         XSL_IMPORT = 0xfffff & pool.allocate("xsl", Namespace.XSLT, "import");
168         XSL_INCLUDE = 0xfffff & pool.allocate("xsl", Namespace.XSLT, "include");
169         XSL_KEY = 0xfffff & pool.allocate("xsl", Namespace.XSLT, "key");
170         XSL_MESSAGE = 0xfffff & pool.allocate("xsl", Namespace.XSLT, "message");
171         XSL_NUMBER = 0xfffff & pool.allocate("xsl", Namespace.XSLT, "number");
172         XSL_NAMESPACE_ALIAS = 0xfffff & pool.allocate("xsl", Namespace.XSLT, "namespace-alias");
173         XSL_OTHERWISE = 0xfffff & pool.allocate("xsl", Namespace.XSLT, "otherwise");
174         XSL_OUTPUT = 0xfffff & pool.allocate("xsl", Namespace.XSLT, "output");
175         XSL_PARAM = 0xfffff & pool.allocate("xsl", Namespace.XSLT, "param");
176         XSL_PRESERVE_SPACE = 0xfffff & pool.allocate("xsl", Namespace.XSLT, "preserve-space");
177         XSL_PROCESSING_INSTRUCTION =
178                                 0xfffff & pool.allocate("xsl", Namespace.XSLT, "processing-instruction");
179         XSL_SCRIPT = 0xfffff & pool.allocate("xsl", Namespace.XSLT, "script");
180         XSL_SORT = 0xfffff & pool.allocate("xsl", Namespace.XSLT, "sort");
181         XSL_STRIP_SPACE = 0xfffff & pool.allocate("xsl", Namespace.XSLT, "strip-space");
182         XSL_STYLESHEET = 0xfffff & pool.allocate("xsl", Namespace.XSLT, "stylesheet");
183         XSL_TEMPLATE = 0xfffff & pool.allocate("xsl", Namespace.XSLT, "template");
184         XSL_TEXT = 0xfffff & pool.allocate("xsl", Namespace.XSLT, "text");
185         XSL_TRANSFORM = 0xfffff & pool.allocate("xsl", Namespace.XSLT, "transform");
186         XSL_VALUE_OF = 0xfffff & pool.allocate("xsl", Namespace.XSLT, "value-of");
187         XSL_VARIABLE = 0xfffff & pool.allocate("xsl", Namespace.XSLT, "variable");
188         XSL_WITH_PARAM = 0xfffff & pool.allocate("xsl", Namespace.XSLT, "with-param");
189         XSL_WHEN = 0xfffff & pool.allocate("xsl", Namespace.XSLT, "when");
190         
191         SAXON_ASSIGN = 0xfffff & pool.allocate("saxon", Namespace.SAXON, "assign");
192         SAXON_DOCTYPE = 0xfffff & pool.allocate("saxon", Namespace.SAXON, "doctype");
193         SAXON_ENTITY_REF = 0xfffff & pool.allocate("saxon", Namespace.SAXON, "entity-ref");
194         SAXON_FUNCTION = 0xfffff & pool.allocate("saxon", Namespace.SAXON, "function");
195         SAXON_GROUP = 0xfffff & pool.allocate("saxon", Namespace.SAXON, "group");
196         SAXON_HANDLER = 0xfffff & pool.allocate("saxon", Namespace.SAXON, "handler");
197         SAXON_ITEM = 0xfffff & pool.allocate("saxon", Namespace.SAXON, "item");
198         SAXON_OUTPUT = 0xfffff & pool.allocate("saxon", Namespace.SAXON, "output");
199         SAXON_PREVIEW = 0xfffff & pool.allocate("saxon", Namespace.SAXON, "preview");
200         SAXON_SCRIPT = 0xfffff & pool.allocate("saxon", Namespace.SAXON, "script");
201         SAXON_RETURN = 0xfffff & pool.allocate("saxon", Namespace.SAXON, "return");
202         SAXON_WHILE = 0xfffff & pool.allocate("saxon", Namespace.SAXON, "while");
203
204         EXSLT_FUNC_FUNCTION = 0xfffff & pool.allocate("func", Namespace.EXSLT_FUNCTIONS, "function");
205         EXSLT_FUNC_RESULT = 0xfffff & pool.allocate("func", Namespace.EXSLT_FUNCTIONS, "result");
206
207         
208         ARCHIVE = 0xfffff & pool.allocate("", "", "archive");
209         CASE_ORDER = 0xfffff & pool.allocate("", "", "case-order");
210         CDATA_SECTION_ELEMENTS= 0xfffff & pool.allocate("", "", "cdata-section-elements");
211         COUNT = 0xfffff & pool.allocate("", "", "count");
212         DATA_TYPE = 0xfffff & pool.allocate("", "", "data-type");
213         DECIMAL_SEPARATOR = 0xfffff & pool.allocate("", "", "decimal-separator");
214         DIGIT = 0xfffff & pool.allocate("", "", "digit");
215         DISABLE_OUTPUT_ESCAPING=0xfffff & pool.allocate("", "", "disable-output-escaping");
216         DOCTYPE_PUBLIC = 0xfffff & pool.allocate("", "", "doctype-public");
217         DOCTYPE_SYSTEM = 0xfffff & pool.allocate("", "", "doctype-system");
218         ELEMENTS = 0xfffff & pool.allocate("", "", "elements");
219         ENCODING = 0xfffff & pool.allocate("", "", "encoding");
220         EXCLUDE_RESULT_PREFIXES =
221                                 0xfffff & pool.allocate("", "", "exclude-result-prefixes");
222         EXTENSION_ELEMENT_PREFIXES =
223                                 0xfffff & pool.allocate("", "", "extension-element-prefixes");
224         //FILE = 0xfffff & pool.allocate("", "", "file");
225
FORMAT = 0xfffff & pool.allocate("", "", "format");
226         FROM = 0xfffff & pool.allocate("", "", "from");
227         GROUPING_SEPARATOR = 0xfffff & pool.allocate("", "", "grouping-separator");
228         GROUPING_SIZE = 0xfffff & pool.allocate("", "", "grouping-size");
229         GROUP_BY = 0xfffff & pool.allocate("", "", "group-by");
230         HANDLER = 0xfffff & pool.allocate("", "", "handler");
231         HREF = 0xfffff & pool.allocate("", "", "href");
232         ID = 0xfffff & pool.allocate("", "", "id");
233         IMPLEMENTS_PREFIX = 0xfffff & pool.allocate("", "", "implements-prefix");
234         INDENT = 0xfffff & pool.allocate("", "", "indent");
235         INFINITY = 0xfffff & pool.allocate("", "", "infinity");
236         LANG = 0xfffff & pool.allocate("", "", "lang");
237         LANGUAGE = 0xfffff & pool.allocate("", "", "language");
238         LETTER_VALUE = 0xfffff & pool.allocate("", "", "letter-value");
239         LEVEL = 0xfffff & pool.allocate("", "", "level");
240         MATCH = 0xfffff & pool.allocate("", "", "match");
241         MEDIA_TYPE = 0xfffff & pool.allocate("", "", "media-type");
242         METHOD = 0xfffff & pool.allocate("", "", "method");
243         MINUS_SIGN = 0xfffff & pool.allocate("", "", "minus-sign");
244         MODE = 0xfffff & pool.allocate("", "", "mode");
245         NAME = 0xfffff & pool.allocate("", "", "name");
246         NAMESPACE = 0xfffff & pool.allocate("", "", "namespace");
247         NAN = 0xfffff & pool.allocate("", "", "NaN");
248         OMIT_XML_DECLARATION = 0xfffff & pool.allocate("", "", "omit-xml-declaration");
249         ORDER = 0xfffff & pool.allocate("", "", "order");
250         PATTERN_SEPARATOR = 0xfffff & pool.allocate("", "", "pattern-separator");
251         PERCENT = 0xfffff & pool.allocate("", "", "percent");
252         PER_MILLE = 0xfffff & pool.allocate("", "", "per-mille");
253         PRIORITY = 0xfffff & pool.allocate("", "", "priority");
254         RESULT_PREFIX = 0xfffff & pool.allocate("", "", "result-prefix");
255         SELECT = 0xfffff & pool.allocate("", "", "select");
256         SRC = 0xfffff & pool.allocate("", "", "src");
257         STANDALONE = 0xfffff & pool.allocate("", "", "standalone");
258         STYLESHEET_PREFIX = 0xfffff & pool.allocate("", "", "stylesheet-prefix");
259         TERMINATE = 0xfffff & pool.allocate("", "", "terminate");
260         TEST = 0xfffff & pool.allocate("", "", "test");
261         USE = 0xfffff & pool.allocate("", "", "use");
262         USE_ATTRIBUTE_SETS = 0xfffff & pool.allocate("", "", "use-attribute-sets");
263         USER_DATA = 0xfffff & pool.allocate("", "", "user-data");
264         VALUE = 0xfffff & pool.allocate("", "", "value");
265         VERSION = 0xfffff & pool.allocate("", "", "version");
266         ZERO_DIGIT = 0xfffff & pool.allocate("", "", "zero-digit");
267
268         SAXON_ALLOW_AVT = 0xfffff & pool.allocate("saxon", Namespace.SAXON, "allow-avt");
269         SAXON_ASSIGNABLE = 0xfffff & pool.allocate("saxon", Namespace.SAXON, "assignable");
270         SAXON_DISABLE_OUTPUT_ESCAPING =
271                                 0xfffff & pool.allocate("saxon", Namespace.SAXON, "disable-output-escaping");
272         SAXON_INDENT_SPACES = 0xfffff & pool.allocate("saxon", Namespace.SAXON, "indent-spaces");
273         SAXON_OMIT_META_TAG =
274                                 0xfffff & pool.allocate("saxon", Namespace.SAXON, "omit-meta-tag");
275         SAXON_CHARACTER_REPRESENTATION =
276                                 0xfffff & pool.allocate("saxon", Namespace.SAXON, "character-representation");
277         SAXON_NEXT_IN_CHAIN = 0xfffff & pool.allocate("saxon", Namespace.SAXON, "next-in-chain");
278
279         XSL_EXCLUDE_RESULT_PREFIXES =
280                                 0xfffff & pool.allocate("xsl", Namespace.XSLT, "exclude-result-prefixes");
281         XSL_EXTENSION_ELEMENT_PREFIXES =
282                                 0xfffff & pool.allocate("xsl", Namespace.XSLT, "extension-element-prefixes");
283         XSL_USE_ATTRIBUTE_SETS =
284                                 0xfffff & pool.allocate("xsl", Namespace.XSLT, "use-attribute-sets");
285         XSL_VERSION = 0xfffff & pool.allocate("xsl", Namespace.XSLT, "version");
286
287     }
288
289     /**
290     * Utility routine to generate Java constants for the standard names used in
291     * the stylesheet
292     */

293     
294     public static void main(String JavaDoc[] args) {
295         NamePool pool = NamePool.getDefaultNamePool();
296         pool.generateJavaConstants();
297     }
298
299 }
300
Popular Tags