KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > apache > xerces > utils > XMLMessages


1 /*
2  * The Apache Software License, Version 1.1
3  *
4  *
5  * Copyright (c) 1999 The Apache Software Foundation. All rights
6  * reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions
10  * are met:
11  *
12  * 1. Redistributions of source code must retain the above copyright
13  * notice, this list of conditions and the following disclaimer.
14  *
15  * 2. Redistributions in binary form must reproduce the above copyright
16  * notice, this list of conditions and the following disclaimer in
17  * the documentation and/or other materials provided with the
18  * distribution.
19  *
20  * 3. The end-user documentation included with the redistribution,
21  * if any, must include the following acknowledgment:
22  * "This product includes software developed by the
23  * Apache Software Foundation (http://www.apache.org/)."
24  * Alternately, this acknowledgment may appear in the software itself,
25  * if and wherever such third-party acknowledgments normally appear.
26  *
27  * 4. The names "Xerces" and "Apache Software Foundation" must
28  * not be used to endorse or promote products derived from this
29  * software without prior written permission. For written
30  * permission, please contact apache@apache.org.
31  *
32  * 5. Products derived from this software may not be called "Apache",
33  * nor may "Apache" appear in their name, without prior written
34  * permission of the Apache Software Foundation.
35  *
36  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
37  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
38  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
39  * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
40  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
41  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
42  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
43  * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
44  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
45  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
46  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
47  * SUCH DAMAGE.
48  * ====================================================================
49  *
50  * This software consists of voluntary contributions made by many
51  * individuals on behalf of the Apache Software Foundation and was
52  * originally based on software copyright (c) 1999, International
53  * Business Machines, Inc., http://www.apache.org. For more
54  * information on the Apache Software Foundation, please see
55  * <http://www.apache.org/>.
56  */

57
58 package org.enhydra.apache.xerces.utils;
59
60 import java.util.ListResourceBundle JavaDoc;
61 import java.util.Locale JavaDoc;
62 import java.util.ResourceBundle JavaDoc;
63
64 /**
65  * XMLMessages provides error messages for the XML 1.0 Recommendation and for
66  * the Namespaces Recommendation
67  *
68  */

69 public class XMLMessages implements XMLMessageProvider {
70     /**
71      * The domain of messages concerning the XML 1.0 specification.
72      */

73     public static final String JavaDoc XML_DOMAIN = "http://www.w3.org/TR/1998/REC-xml-19980210";
74     public static final String JavaDoc XMLNS_DOMAIN = "http://www.w3.org/TR/1999/REC-xml-names-19990114";
75
76     /**
77      *
78      */

79     public void setLocale(Locale JavaDoc locale) {
80         fLocale = locale;
81     }
82     /**
83      *
84      */

85     public Locale JavaDoc getLocale() {
86         return fLocale;
87     }
88
89     /**
90      * Creates a message from the specified key and replacement
91      * arguments, localized to the given locale.
92      *
93      * @param locale The requested locale of the message to be
94      * created.
95      * @param key The key for the message text.
96      * @param args The arguments to be used as replacement text
97      * in the message created.
98      */

99     public String JavaDoc createMessage(Locale JavaDoc locale, int majorCode, int minorCode, Object JavaDoc args[]) {
100         boolean throwex = false;
101         if (fResourceBundle == null || locale != fLocale) {
102             if (locale != null)
103                 fResourceBundle = ListResourceBundle.getBundle("org.enhydra.apache.xerces.msg.XMLMessages", locale);
104             if (fResourceBundle == null)
105                 fResourceBundle = ListResourceBundle.getBundle("org.enhydra.apache.xerces.msg.XMLMessages");
106         }
107         if (majorCode < 0 || majorCode >= fgMessageKeys.length - 1) {
108             majorCode = MSG_BAD_MAJORCODE;
109             throwex = true;
110         }
111         String JavaDoc msgKey = fgMessageKeys[majorCode];
112         String JavaDoc msg = fResourceBundle.getString(msgKey);
113         if (args != null) {
114             try {
115                 msg = java.text.MessageFormat.format(msg, args);
116             } catch (Exception JavaDoc e) {
117                 msg = fResourceBundle.getString(fgMessageKeys[MSG_FORMAT_FAILURE]);
118                 msg += " " + fResourceBundle.getString(msgKey);
119             }
120         }
121 /*
122         if (minorCode > 0 && minorCode < fgConstraints.length - 1) {
123             Constraint c = fgConstraints[minorCode];
124             String prefix = "{ " + c.sections;
125             if (c.productions != null && c.productions.length() != 0)
126                 prefix = prefix + " " + c.productions;
127             msg = prefix + " } " + msg;
128         }
129  */

130         if (throwex) {
131             throw new RuntimeException JavaDoc(msg);
132         }
133         return msg;
134     }
135     //
136
//
137
//
138
private Locale JavaDoc fLocale = null;
139     private ResourceBundle JavaDoc fResourceBundle = null;
140     //
141
//
142
//
143
public static final int
144         MSG_BAD_MAJORCODE = 0, // majorCode parameter to createMessage was out of bounds
145
MSG_FORMAT_FAILURE = 1, // exception thrown during messageFormat call
146
MSG_LESSTHAN_IN_ATTVALUE = 2, // '<' found in attribute value
147
MSG_ROOT_ELEMENT_TYPE = 3, // document root element type does not match the doctypedecl Name
148
MSG_IDREFS_INVALID = 4, // attributes of type IDREFS must match the Names production
149
MSG_NMTOKENS_INVALID = 5, // attributes of type NMTOKENS must match the Nmtokens production
150
MSG_RESERVED_PITARGET = 6, // PITarget matching [Xx][Mm][Ll] is reserved
151
MSG_SPACE_REQUIRED_IN_PI = 7, // white space is required between PITarget and data
152
MSG_INVALID_CHAR_IN_PI = 8, // invalid character found in PI data
153
MSG_DASH_DASH_IN_COMMENT = 9, // the string "--" in not allowed in comments
154
MSG_INVALID_CHAR_IN_COMMENT = 10, // invalid character found in comment
155
MSG_INVALID_CHARREF = 11, // invalid value for character reference
156
MSG_INVALID_CHAR_IN_ATTVALUE = 12, // invalid character found in attribute value
157
MSG_QUOTE_REQUIRED_IN_ATTVALUE = 13, // attribute value was not a quoted string
158
MSG_NAME_REQUIRED_IN_REFERENCE = 14, // a Name did not follow the '&' in the entity reference
159
MSG_SEMICOLON_REQUIRED_IN_REFERENCE = 15, // a ';' did not follow the Name in the entity reference
160
MSG_DIGIT_REQUIRED_IN_CHARREF = 16, // a decimal representation did not follow the "&#" in the character reference
161
MSG_HEXDIGIT_REQUIRED_IN_CHARREF = 17, // a hexadecimal representation did not follow the "&#x" in the character reference
162
MSG_SEMICOLON_REQUIRED_IN_CHARREF = 18, // the ';' delimiter was not found in the character reference
163
MSG_QUOTE_REQUIRED_IN_SYSTEMID = 19, // system identifier was not a quoted string
164
MSG_INVALID_CHAR_IN_SYSTEMID = 20, // invalid character found in system identifier
165
MSG_QUOTE_REQUIRED_IN_PUBLICID = 21, // public identifier was not a quoted string
166
MSG_INVALID_CHAR_IN_PUBLICID = 22, // invalid character found in public identifier
167
MSG_INCLUDESECT_UNTERMINATED = 23, // includeSect must end with "]]>"
168
MSG_IGNORESECT_UNTERMINATED = 24, // ignoreSect must end with "]]>"
169
MSG_INVALID_CHAR_IN_IGNORESECT = 25, // invalid character found in ignoreSect
170
MSG_ELEMENT_UNTERMINATED = 26, // element type not followed by attributes, ">" or "/>"
171
MSG_EQ_REQUIRED_IN_ATTRIBUTE = 27, // attribute name not followed by "="
172
MSG_ATTRIBUTE_NOT_UNIQUE = 28, // specified attributes must be unique within the element tag
173
MSG_ENCODINGDECL_REQUIRED = 29, // the "encoding" declaration is required in a text declaration
174
MSG_VERSIONINFO_REQUIRED = 30, // the "version" is required in the XML declaration
175
MSG_EQ_REQUIRED_IN_XMLDECL = 31, // the '=' character must follow \"{0}\" in the XML declaration
176
MSG_EQ_REQUIRED_IN_TEXTDECL = 32, // the '=' character must follow \"{0}\" in the text declaration
177
MSG_QUOTE_REQUIRED_IN_XMLDECL = 33, // quote missing in the XML declaration
178
MSG_QUOTE_REQUIRED_IN_TEXTDECL = 34, // quote missing in the text declaration
179
MSG_INVALID_CHAR_IN_XMLDECL = 35, // invalid character found in the XML declaration
180
MSG_INVALID_CHAR_IN_TEXTDECL = 36, // invalid character found in the text declaration
181
MSG_VERSIONINFO_INVALID = 37, // Invalid XML version format, \"{0}\"
182
MSG_VERSION_NOT_SUPPORTED = 38, // unsupported XML version
183
MSG_SPACE_REQUIRED_IN_TEXTDECL = 39, // white space required between version and encoding
184
MSG_ENCODINGDECL_INVALID = 40, // invalid encoding name
185
MSG_SDDECL_INVALID = 41, // invalid \"standalone\" attribute value. Must be "yes" or "no"
186
MSG_XMLDECL_UNTERMINATED = 42, // "\"?>\" expected.
187
MSG_TEXTDECL_UNTERMINATED = 43, // "\"?>\" expected.
188
MSG_INVALID_CHAR_IN_INTERNAL_SUBSET = 44, // invalid character found in the internal subset of the dtd
189
MSG_INVALID_CHAR_IN_EXTERNAL_SUBSET = 45, // invalid character found in the external subset of the dtd
190
MSG_INVALID_CHAR_IN_ENTITYVALUE = 46, // invalid character found in entity value
191
MSG_MIXED_CONTENT_UNTERMINATED = 47, // mixed content model with element types must end with ")*"
192
MSG_NAME_REQUIRED_IN_PEREFERENCE = 48, // a Name did not follow the '&' in the parameter entity reference
193
MSG_SEMICOLON_REQUIRED_IN_PEREFERENCE = 49, // a ';' did not follow the Name in the parameter entity reference
194
MSG_EXTERNALID_REQUIRED = 50, // an external id did not begin with SYSTEM or PUBLIC
195
MSG_PEREFERENCE_WITHIN_MARKUP = 51, // a PEReference is not allowed within markup in the internal subset of the DTD
196
MSG_INVALID_CHAR_IN_PROLOG = 52, // invalid character found in prolog
197
MSG_INVALID_CHAR_IN_MISC = 53, // invalid character found in trailing misc
198
MSG_INVALID_CHAR_IN_CDSECT = 54, // invalid character found in cdata section
199
MSG_INVALID_CHAR_IN_CONTENT = 55, // invalid character found in content
200
MSG_ETAG_REQUIRED = 56, // end of input before end of element content
201
MSG_ETAG_UNTERMINATED = 57, // the end-tag did not end with a '>'
202
MSG_ATTRIBUTE_NAME_REQUIRED_IN_ATTDEF = 58, // attribute name expected
203
MSG_ATTTYPE_REQUIRED_IN_ATTDEF = 59, // attribute type expected
204
MSG_PUBIDCHAR_ILLEGAL = 60, // illegal character found in public identifier
205
MSG_ENCODING_NOT_SUPPORTED = 61, // encoding is not supported
206
MSG_ENTITY_NOT_DECLARED = 62, // entity was not declared
207
MSG_REFERENCE_TO_UNPARSED_ENTITY = 63,
208         MSG_REFERENCE_TO_EXTERNAL_ENTITY = 64,
209         MSG_AVAILABLE0 = 65,
210         MSG_CDSECT_UNTERMINATED = 66, // CDATA sections must end with "]]>"
211
MSG_DUPLICATE_TYPE_IN_MIXED_CONTENT = 67,
212         MSG_ELEMENT_ENTITY_MISMATCH = 68,
213         MSG_ID_DEFAULT_TYPE_INVALID = 69,
214         MSG_ENCODING_REQUIRED = 70,
215         MSG_RECURSIVE_REFERENCE = 71,
216         MSG_RECURSIVE_PEREFERENCE = 72,
217         MSG_IMPROPER_DECLARATION_NESTING = 73, // "Parameter entity replacement text must include declarations or proper pairs of ''<'' and ''>''. (entity: \"%{0};\")"
218
MSG_IMPROPER_GROUP_NESTING = 74, // "Parameter entity replacement text must include proper pairs of parentheses in content model, \"%{0};\"."
219
MSG_ID_INVALID = 75,
220         MSG_ID_NOT_UNIQUE = 76,
221         MSG_IDREF_INVALID = 77,
222         MSG_NMTOKEN_INVALID = 78,
223         MSG_ENTITY_INVALID = 79,
224         MSG_ENTITIES_INVALID = 80,
225         MSG_ELEMENT_WITH_ID_REQUIRED = 81,
226         MSG_ATTRIBUTE_NOT_DECLARED = 82,
227         MSG_ELEMENT_NOT_DECLARED = 83,
228         MSG_AVAILABLE1 = 84,
229         MSG_DUPLICATE_ATTDEF = 85,
230         MSG_MORE_THAN_ONE_ID_ATTRIBUTE = 86,
231         MSG_CONTENT_INVALID = 87,
232         MSG_CONTENT_INCOMPLETE = 88,
233         MSG_ELEMENT_ALREADY_DECLARED = 89,
234         MSG_ATTRIBUTE_VALUE_NOT_IN_LIST = 90,
235         MSG_AVAILABLE2 = 91,
236         MSG_UNDECLARED_ELEMENT_IN_CONTENTSPEC = 92,
237         MSG_FIXED_ATTVALUE_INVALID = 93,
238         MSG_REQUIRED_ATTRIBUTE_NOT_SPECIFIED = 94,
239         MSG_DEFAULTED_ATTRIBUTE_NOT_SPECIFIED = 95,
240         MSG_AVAILABLE3 = 96,
241         MSG_AVAILABLE4 = 97,
242         MSG_CLOSE_PAREN_REQUIRED_IN_CHILDREN = 98,
243         MSG_AVAILABLE5 = 99,
244         MSG_SYSTEMID_UNTERMINATED = 100,
245         MSG_PUBLICID_UNTERMINATED = 101,
246         MSG_EXTERNAL_ENTITY_NOT_PERMITTED = 102,
247         MSG_AVAILABLE6 = 103,
248         MSG_XMLDECL_MUST_BE_FIRST = 104,
249         MSG_TEXTDECL_MUST_BE_FIRST = 105,
250         MSG_ELEMENTDECL_UNTERMINATED = 106,
251         MSG_SPACE_REQUIRED_BEFORE_ENTITY_NAME_IN_PEDECL = 107,
252         MSG_SPACE_REQUIRED_BEFORE_ENTITY_NAME_IN_ENTITYDECL = 108,
253         MSG_SPACE_REQUIRED_BEFORE_PERCENT_IN_PEDECL = 109,
254         MSG_ENTITY_NAME_REQUIRED_IN_ENTITYDECL = 110,
255         MSG_SPACE_REQUIRED_AFTER_ENTITY_NAME_IN_ENTITYDECL = 111,
256         MSG_ENTITYDECL_UNTERMINATED = 112,
257         MSG_NOTATION_NAME_REQUIRED_FOR_UNPARSED_ENTITYDECL = 113,
258         MSG_NOTATION_NOT_DECLARED_FOR_UNPARSED_ENTITYDECL = 114,
259         MSG_NAME_REQUIRED_IN_NOTATIONTYPE = 115,
260         MSG_NMTOKEN_REQUIRED_IN_ENUMERATION = 116,
261         MSG_NOTATION_NOT_DECLARED_FOR_NOTATIONTYPE_ATTRIBUTE = 117,
262         MSG_NOTATIONTYPE_UNTERMINATED = 118,
263         MSG_ENUMERATION_UNTERMINATED = 119,
264         MSG_NOTATION_NAME_REQUIRED_IN_NOTATIONDECL = 120,
265         MSG_MORE_THAN_ONE_NOTATION_ATTRIBUTE = 121,
266         MSG_NOTATIONDECL_UNTERMINATED = 122,
267         MSG_ATTVALUE_CHANGED_DURING_NORMALIZATION_WHEN_STANDALONE = 123,
268         MSG_CDEND_IN_CONTENT = 124,
269         MSG_ELEMENT_TYPE_REQUIRED_IN_ATTLISTDECL = 125,
270         MSG_TWO_COLONS_IN_QNAME = 126,
271         MSG_MARKUP_NOT_RECOGNIZED_IN_CONTENT = 127,
272         MSG_MARKUP_NOT_RECOGNIZED_IN_MISC = 128,
273         MSG_MARKUP_NOT_RECOGNIZED_IN_PROLOG = 129,
274         MSG_OPEN_PAREN_REQUIRED_IN_NOTATIONTYPE = 130,
275         MSG_PITARGET_REQUIRED = 131,
276         MSG_REFERENCE_TO_EXTERNALLY_DECLARED_ENTITY_WHEN_STANDALONE = 132,
277         MSG_URI_FRAGMENT_IN_SYSTEMID = 133,
278         MSG_ROOT_ELEMENT_REQUIRED = 134,
279         MSG_SPACE_REQUIRED_AFTER_FIXED_IN_DEFAULTDECL = 135,
280         MSG_SPACE_REQUIRED_AFTER_NOTATION_IN_NOTATIONTYPE = 136,
281         MSG_SPACE_REQUIRED_AFTER_NOTATION_NAME_IN_NOTATIONDECL = 137,
282         MSG_SPACE_REQUIRED_BEFORE_ATTRIBUTE_NAME_IN_ATTDEF = 138,
283         MSG_SPACE_REQUIRED_BEFORE_ATTTYPE_IN_ATTDEF = 139,
284         MSG_SPACE_REQUIRED_BEFORE_DEFAULTDECL_IN_ATTDEF = 140,
285         MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ATTLISTDECL = 141,
286         MSG_SPACE_REQUIRED_BEFORE_NOTATION_NAME_IN_NOTATIONDECL = 142,
287         MSG_WHITE_SPACE_IN_ELEMENT_CONTENT_WHEN_STANDALONE = 143,
288         MSG_XML_SPACE_DECLARATION_ILLEGAL = 144,
289         MSG_CLOSE_PAREN_REQUIRED_IN_MIXED = 145,
290         MSG_CONTENTSPEC_REQUIRED_IN_ELEMENTDECL = 146,
291         MSG_DOCTYPEDECL_UNTERMINATED = 147,
292         MSG_ELEMENT_TYPE_REQUIRED_IN_ELEMENTDECL = 148,
293         MSG_ELEMENT_TYPE_REQUIRED_IN_MIXED_CONTENT = 149,
294         MSG_MARKUP_NOT_RECOGNIZED_IN_DTD = 150,
295         MSG_ATTRIBUTE_VALUE_UNTERMINATED = 151,
296         MSG_OPEN_PAREN_OR_ELEMENT_TYPE_REQUIRED_IN_CHILDREN = 152,
297         MSG_ROOT_ELEMENT_TYPE_REQUIRED = 153,
298         MSG_SPACE_REQUIRED_AFTER_PUBIDLITERAL_IN_EXTERNALID = 154,
299         MSG_SPACE_REQUIRED_BEFORE_CONTENTSPEC_IN_ELEMENTDECL = 155,
300         MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ELEMENTDECL = 156,
301         MSG_SPACE_REQUIRED_BEFORE_NOTATION_NAME_IN_UNPARSED_ENTITYDECL = 157,
302         MSG_SPACE_REQUIRED_BEFORE_PUBIDLITERAL_IN_EXTERNALID = 158,
303         MSG_SPACE_REQUIRED_BEFORE_ROOT_ELEMENT_TYPE_IN_DOCTYPEDECL = 159,
304         MSG_SPACE_REQUIRED_BEFORE_SYSTEMLITERAL_IN_EXTERNALID = 160,
305         MSG_REFERENCE_NOT_IN_ONE_ENTITY = 161,
306         MSG_COMMENT_NOT_IN_ONE_ENTITY = 162,
307         MSG_COMMENT_UNTERMINATED = 163,
308         MSG_PI_UNTERMINATED = 164,
309         MSG_PI_NOT_IN_ONE_ENTITY = 165,
310         MSG_REFERENCE_UNTERMINATED = 166,
311         MSG_PREFIX_DECLARED = 167,
312         MSG_ATT_DEFAULT_INVALID = 168,
313         MSG_GENERIC_SCHEMA_ERROR = 169,
314         MSG_DTD_SCHEMA_ERROR = 170,
315         MSG_NAMESPACE_NAME_EMPTY = 171,
316
317         // ...
318
MSG_MAX_CODE = 200;
319
320     private static final String JavaDoc[] fgMessageKeys = {
321         "BadMajorCode", // 0, "The majorCode parameter to createMessage was out of bounds."
322
"FormatFailed", // 1, "An internal error occurred while formatting the following message:"
323
"LessthanInAttValue", // 2, "The attribute value must not contain the '<' character."
324
"RootElementTypeMustMatchDoctypedecl", // 3, "The document root element type \"{1}\" must match the document type declaration name \"{0}\"."
325
"IDREFSInvalid", // 4, "Attribute value \"{1}\" of type IDREFS must be one or more names."
326
"NMTOKENSInvalid", // 5, "Attribute value \"{1}\" of type NMTOKENS must contain one or more name tokens."
327
"ReservedPITarget", // 6, "The processing instruction target matching \"[xX][mM][lL]\" is not allowed."
328
"SpaceRequiredInPI", // 7, "White space is required between the processing instruction target and data."
329
"InvalidCharInPI", // 8, "An invalid XML character (Unicode: 0x{0}) was found in the processing instruction."
330
"DashDashInComment", // 9, "The string \"--\" is not permitted within comments."
331
"InvalidCharInComment", // 10, "An invalid XML character (Unicode: 0x{0}) was found in the comment."
332
"InvalidCharRef", // 11, "Character reference \"&#{0}\" is an invalid XML character."
333
"InvalidCharInAttValue", // 12, "An invalid XML character (Unicode: 0x{0}) was found in the attribute value."
334
"QuoteRequiredInAttValue", // 13, "The attribute value must begin with either a single or double quote character."
335
"NameRequiredInReference", // 14, "The entity name must immediately follow the '&' in the entity reference."
336
"SemicolonRequiredInReference", // 15, "The entity reference must end with the ';' delimiter."
337
"DigitRequiredInCharRef", // 16, "A decimal representation must immediately follow the \"&#\" in the character reference."
338
"HexdigitRequiredInCharRef", // 17, "A hexadecimal representation must immediately follow the \"&#x\" in the character reference."
339
"SemicolonRequiredInCharRef", // 18, "The character reference must end with the ';' delimiter."
340
"QuoteRequiredInSystemID", // 19, "The system identifier must begin with either a single or double quote character."
341
"InvalidCharInSystemID", // 20, "An invalid XML character (Unicode: 0x{0}) was found in the system identifier."
342
"QuoteRequiredInPublicID", // 21, "The public identifier must begin with either a single or double quote character."
343
"InvalidCharInPublicID", // 22, "An invalid XML character (Unicode: 0x{0}) was found in the public identifier."
344
"IncludeSectUnterminated", // 23, "The included conditional section must end with \"]]>\"."
345
"IgnoreSectUnterminated", // 24, "The excluded conditional section must end with \"]]>\"."
346
"InvalidCharInIgnoreSect", // 25, "An invalid XML character (Unicode: 0x{0}) was found in the excluded conditional section."
347
"ElementUnterminated", // 26, "Element type \"{0}\" must be followed by either attribute specifications, \">\" or \"/>\"."
348
"EqRequiredInAttribute", // 27, "Attribute name \"{1}\" must be followed by the '=' character."
349
"AttributeNotUnique", // 28, "Attribute \"{1}\" was already specified for element \"{0}\"."
350
"EncodingDeclRequired", // 29, "The encoding declaration is required within a text declaration."
351
"VersionInfoRequired", // 30, "The version is required within an XML declaration."
352
"EqRequiredInXMLDecl", // 31, "The '=' character must follow \"{0}\" in the XML declaration."
353
"EqRequiredInTextDecl", // 32, "The '=' character must follow \"{0}\" in the text declaration."
354
"QuoteRequiredInXMLDecl", // 33, "The value following \"{0}\" in an XML declaration must be a quoted string."
355
"QuoteRequiredInTextDecl", // 34, "The value following \"{0}\" in a text declaration must be a quoted string."
356
"InvalidCharInXMLDecl", // 35, "An invalid XML character (Unicode: 0x{0}) was found in the XML declaration."
357
"InvalidCharInTextDecl", // 36, "An invalid XML character (Unicode: 0x{0}) was found in the text declaration."
358
"VersionInfoInvalid", // 37, "Invalid version \"{0}\"."
359
"VersionNotSupported", // 38, "XML version \"{0}\" is not supported."
360
"SpaceRequiredInTextDecl", // 39, "White space is required between the version and the encoding declaration."
361
"EncodingDeclInvalid", // 40, "Invalid encoding name \"{0}\"."
362
"SDDeclInvalid", // 41, "The standalone document declaration value must be \"yes\" or \"no\", not \"{0}\"."
363
"XMLDeclUnterminated", // 42, "The XML declaration must end with \"?>\"."
364
"TextDeclUnterminated", // 43, "The text declaration must end with \"?>\"."
365
"InvalidCharInInternalSubset", // 44, "An invalid XML character (Unicode: 0x{0}) was found in the internal subset of the DTD."
366
"InvalidCharInExternalSubset", // 45, "An invalid XML character (Unicode: 0x{0}) was found in the external subset of the DTD."
367
"InvalidCharInEntityValue", // 46, "An invalid XML character (Unicode: 0x{0}) was found in the literal entity value."
368
"MixedContentUnterminated", // 47, "The mixed content model \"(0}\" must end with \")*\"."
369
"NameRequiredInPEReference", // 48, "The entity name must immediately follow the '%' in the parameter entity reference."
370
"SemicolonRequiredInPEReference", // 49, "The parameter entity reference must end with the ';' delimiter."
371
"ExternalIDRequired", // 50, "The external entity declaration must begin with either \"SYSTEM\" or \"PUBLIC\"."
372
"PEReferenceWithinMarkup", // 51, "The parameter entity reference \"%(0);\" cannot occur within markup in the internal subset of the DTD."
373
"InvalidCharInProlog", // 52, "An invalid XML character (Unicode: 0x{0}) was found in the prolog of the document."
374
"InvalidCharInMisc", // 53, "An invalid XML character (Unicode: 0x{0}) was found in markup after the end of the element content."
375
"InvalidCharInCDSect", // 54, "An invalid XML character (Unicode: 0x{0}) was found in the CDATA section."
376
"InvalidCharInContent", // 55, "An invalid XML character (Unicode: 0x{0}) was found in the element content of the document."
377
"ETagRequired", // 56, "The element type \"{0}\" must be terminated by the matching end-tag \"</{0}>\"."
378
"ETagUnterminated", // 57, "The end-tag for element type \"{0}\" must end with a ''>'' delimiter."
379
"AttNameRequiredInAttDef", // 58, "The attribute name must be specified in the attribute-list declaration for element \"{0}\"."
380
"AttTypeRequiredInAttDef", // 59, "The attribute type must be specified in the attribute-list declaration of attribute \"{1}\" for element \"{0}\"."
381
"PubidCharIllegal", // 60, "The character (Unicode: 0x{0}) is not permitted in the public identifier."
382
"EncodingNotSupported", // 61, "The encoding \"{0}\" is not supported."
383
"EntityNotDeclared", // 62, "The entity \"{0}\" was referenced, but not declared."
384
"ReferenceToUnparsedEntity", // 63, "The unparsed entity reference \"&{0};\" is not permitted."
385
"ReferenceToExternalEntity", // 64, "The external entity reference \"&{0};\" is not permitted in an attribute value."
386
"MSG_AVAILABLE0", // 65,
387
"CDSectUnterminated", // 66, "The CDATA section must end with \"]]>\"."
388
"DuplicateTypeInMixedContent", // 67, "The element type \"{0}\" was already specified in this content model."
389
"ElementEntityMismatch", // 68, "The element \"{0}\" must start and end within the same entity."
390
"IDDefaultTypeInvalid", // 69, "The ID attribute \"{0}\" must have a declared default of \"#IMPLIED\" or \"#REQUIRED\"."
391
"EncodingRequired", // 70, "A parsed entity not encoded in either UTF-8 or UTF-16 must contain an encoding declaration."
392
"RecursiveReference", // 71, "Recursive reference \"&{0};\". (Reference path: {1})"
393
"RecursivePEReference", // 72, "Recursive reference \"%{0};\". (Reference path: {1})"
394
"ImproperDeclarationNesting", // 73, "The replacement text of parameter entity \"(0)\" must include properly nested declarations."
395
"ImproperGroupNesting", // 74, "The replacement text of parameter entity \"(0)\" must include properly nested pairs of parentheses in content model."
396
"IDInvalid", // 75, "Attribute value \"{1}\" of type ID must be a name."
397
"IDNotUnique", // 76, "Attribute value \"(1}\" of type ID must be unique within the document."
398
"IDREFInvalid", // 77, "Attribute value \"(1}\" of type IDREF must be a name."
399
"NMTOKENInvalid", // 78, "Attribute value \"(1}\" of type NMTOKEN must be a name token."
400
"ENTITYInvalid", // 79, "Attribute value \"(1}\" of type ENTITY must be the name of an unparsed entity."
401
"ENTITIESInvalid", // 80, "Attribute value \"(1}\" of type ENTITIES must be the names of one or more unparsed entities."
402
"MSG_ELEMENT_WITH_ID_REQUIRED", // 81, "MSG_ELEMENT_WITH_ID_REQUIRED"
403
"MSG_ATTRIBUTE_NOT_DECLARED", // 82, "MSG_ATTRIBUTE_NOT_DECLARED"
404
"MSG_ELEMENT_NOT_DECLARED", // 83, "MSG_ELEMENT_NOT_DECLARED"
405
"MSG_AVAILABLE1", // 84,
406
"MSG_DUPLICATE_ATTDEF", // 85, "MSG_DUPLICATE_ATTDEF"
407
"MSG_MORE_THAN_ONE_ID_ATTRIBUTE", // 86, "MSG_MORE_THAN_ONE_ID_ATTRIBUTE"
408
"MSG_CONTENT_INVALID", // 87, "MSG_CONTENT_INVALID"
409
"MSG_CONTENT_INCOMPLETE", // 88, "MSG_CONTENT_INCOMPLETE"
410
"MSG_ELEMENT_ALREADY_DECLARED", // 89, "MSG_ELEMENT_ALREADY_DECLARED"
411
"MSG_ATTRIBUTE_VALUE_NOT_IN_LIST", // 90, "MSG_ATTRIBUTE_VALUE_NOT_IN_LIST"
412
"MSG_AVAILABLE2", // 91,
413
"UndeclaredElementInContentSpec", // 92, "The content model of element \"{0}\" refers to the undeclared element \"{1}\"."
414
"MSG_FIXED_ATTVALUE_INVALID", // 93, "MSG_FIXED_ATTVALUE_INVALID"
415
"MSG_REQUIRED_ATTRIBUTE_NOT_SPECIFIED", // 94, "MSG_REQUIRED_ATTRIBUTE_NOT_SPECIFIED"
416
"MSG_DEFAULTED_ATTRIBUTE_NOT_SPECIFIED", // 95, "MSG_DEFAULTED_ATTRIBUTE_NOT_SPECIFIED"
417
"MSG_AVAILABLE3", // 96,
418
"MSG_AVAILABLE4", // 97,
419
"MSG_CLOSE_PAREN_REQUIRED_IN_CHILDREN", // 98, "MSG_CLOSE_PAREN_REQUIRED_IN_CHILDREN"
420
"MSG_AVAILABLE5", // 99,
421
"SystemIDUnterminated", // 100, "MSG_SYSTEMID_UNTERMINATED"
422
"PublicIDUnterminated", // 101, "MSG_PUBLICID_UNTERMINATED"
423
"MSG_EXTERNAL_ENTITY_NOT_PERMITTED", // 102, "MSG_EXTERNAL_ENTITY_NOT_PERMITTED"
424
"MSG_AVAILABLE6", // 103,
425
"XMLDeclMustBeFirst", // 104, "MSG_XMLDECL_MUST_BE_FIRST"
426
"TextDeclMustBeFirst", // 105, "MSG_TEXTDECL_MUST_BE_FIRST"
427
"ElementDeclUnterminated", // 106, "MSG_ELEMENTDECL_UNTERMINATED"
428
"MSG_SPACE_REQUIRED_BEFORE_ENTITY_NAME_IN_PEDECL", // 107, "MSG_SPACE_REQUIRED_BEFORE_ENTITY_NAME_IN_PEDECL"
429
"MSG_SPACE_REQUIRED_BEFORE_ENTITY_NAME_IN_ENTITYDECL", // 108, "MSG_SPACE_REQUIRED_BEFORE_ENTITY_NAME_IN_ENTITYDECL"
430
"MSG_SPACE_REQUIRED_BEFORE_PERCENT_IN_PEDECL", // 109, "MSG_SPACE_REQUIRED_BEFORE_PERCENT_IN_PEDECL"
431
"MSG_ENTITY_NAME_REQUIRED_IN_ENTITYDECL", // 110, "MSG_ENTITY_NAME_REQUIRED_IN_ENTITYDECL"
432
"MSG_SPACE_REQUIRED_AFTER_ENTITY_NAME_IN_ENTITYDECL", // 111, "MSG_SPACE_REQUIRED_AFTER_ENTITY_NAME_IN_ENTITYDECL"
433
"EntityDeclUnterminated", // 112, "MSG_ENTITYDECL_UNTERMINATED"
434
"MSG_NOTATION_NAME_REQUIRED_FOR_UNPARSED_ENTITYDECL", // 113, "MSG_NOTATION_NAME_REQUIRED_FOR_UNPARSED_ENTITYDECL"
435
"MSG_NOTATION_NOT_DECLARED_FOR_UNPARSED_ENTITYDECL", // 114, "MSG_NOTATION_NOT_DECLARED_FOR_UNPARSED_ENTITYDECL"
436
"MSG_NAME_REQUIRED_IN_NOTATIONTYPE", // 115, "MSG_NAME_REQUIRED_IN_NOTATIONTYPE"
437
"MSG_NMTOKEN_REQUIRED_IN_ENUMERATION", // 116, "MSG_NMTOKEN_REQUIRED_IN_ENUMERATION"
438
"MSG_NOTATION_NOT_DECLARED_FOR_NOTATIONTYPE_ATTRIBUTE", // 117, "MSG_NOTATION_NOT_DECLARED_FOR_NOTATIONTYPE_ATTRIBUTE"
439
"NotationTypeUnterminated", // 118, "MSG_NOTATIONTYPE_UNTERMINATED"
440
"EnumerationUnterminated", // 119, "MSG_ENUMERATION_UNTERMINATED"
441
"MSG_NOTATION_NAME_REQUIRED_IN_NOTATIONDECL", // 120, "MSG_NOTATION_NAME_REQUIRED_IN_NOTATIONDECL"
442
"MSG_MORE_THAN_ONE_NOTATION_ATTRIBUTE", // 121, "MSG_MORE_THAN_ONE_NOTATION_ATTRIBUTE"
443
"NotationDeclUnterminated", // 122, "MSG_NOTATIONDECL_UNTERMINATED"
444
"MSG_ATTVALUE_CHANGED_DURING_NORMALIZATION_WHEN_STANDALONE", // 123, "MSG_ATTVALUE_CHANGED_DURING_NORMALIZATION_WHEN_STANDALONE"
445
"CDEndInContent", // 124, "MSG_CDEND_IN_CONTENT"
446
"MSG_ELEMENT_TYPE_REQUIRED_IN_ATTLISTDECL", // 125, "MSG_ELEMENT_TYPE_REQUIRED_IN_ATTLISTDECL"
447
"TwoColonsInQName", // 126, ""
448
"MarkupNotRecognizedInContent", // 127, "MSG_MARKUP_NOT_RECOGNIZED_IN_CONTENT"
449
"MarkupNotRecognizedInMisc", // 128, "MSG_MARKUP_NOT_RECOGNIZED_IN_MISC"
450
"MarkupNotRecognizedInProlog", // 129, "MSG_MARKUP_NOT_RECOGNIZED_IN_PROLOG"
451
"MSG_OPEN_PAREN_REQUIRED_IN_NOTATIONTYPE", // 130, "MSG_OPEN_PAREN_REQUIRED_IN_NOTATIONTYPE"
452
"PITargetRequired", // 131, "MSG_PITARGET_REQUIRED"
453
"MSG_REFERENCE_TO_EXTERNALLY_DECLARED_ENTITY_WHEN_STANDALONE", // 132, "MSG_REFERENCE_TO_EXTERNALLY_DECLARED_ENTITY_WHEN_STANDALONE"
454
"MSG_URI_FRAGMENT_IN_SYSTEMID", // 133, "MSG_URI_FRAGMENT_IN_SYSTEMID"
455
"RootElementRequired", // 134, "MSG_ROOT_ELEMENT_REQUIRED"
456
"MSG_SPACE_REQUIRED_AFTER_FIXED_IN_DEFAULTDECL", // 135, "MSG_SPACE_REQUIRED_AFTER_FIXED_IN_DEFAULTDECL"
457
"MSG_SPACE_REQUIRED_AFTER_NOTATION_IN_NOTATIONTYPE", // 136, "MSG_SPACE_REQUIRED_AFTER_NOTATION_IN_NOTATIONTYPE"
458
"MSG_SPACE_REQUIRED_AFTER_NOTATION_NAME_IN_NOTATIONDECL", // 137, "MSG_SPACE_REQUIRED_AFTER_NOTATION_NAME_IN_NOTATIONDECL"
459
"MSG_SPACE_REQUIRED_BEFORE_ATTRIBUTE_NAME_IN_ATTDEF", // 138, "MSG_SPACE_REQUIRED_BEFORE_ATTRIBUTE_NAME_IN_ATTDEF"
460
"MSG_SPACE_REQUIRED_BEFORE_ATTTYPE_IN_ATTDEF", // 139, "MSG_SPACE_REQUIRED_BEFORE_ATTTYPE_IN_ATTDEF"
461
"MSG_SPACE_REQUIRED_BEFORE_DEFAULTDECL_IN_ATTDEF", // 140, "MSG_SPACE_REQUIRED_BEFORE_DEFAULTDECL_IN_ATTDEF"
462
"MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ATTLISTDECL", // 141, "MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ATTLISTDECL"
463
"MSG_SPACE_REQUIRED_BEFORE_NOTATION_NAME_IN_NOTATIONDECL", // 142, "MSG_SPACE_REQUIRED_BEFORE_NOTATION_NAME_IN_NOTATIONDECL"
464
"MSG_WHITE_SPACE_IN_ELEMENT_CONTENT_WHEN_STANDALONE", // 143, "MSG_WHITE_SPACE_IN_ELEMENT_CONTENT_WHEN_STANDALONE"
465
"MSG_XML_SPACE_DECLARATION_ILLEGAL", // 144, "MSG_XML_SPACE_DECLARATION_ILLEGAL"
466
"MSG_CLOSE_PAREN_REQUIRED_IN_MIXED", // 145, "MSG_CLOSE_PAREN_REQUIRED_IN_MIXED"
467
"MSG_CONTENTSPEC_REQUIRED_IN_ELEMENTDECL", // 146, "MSG_CONTENTSPEC_REQUIRED_IN_ELEMENTDECL"
468
"DoctypedeclUnterminated", // 147, "MSG_DOCTYPEDECL_UNTERMINATED"
469
"MSG_ELEMENT_TYPE_REQUIRED_IN_ELEMENTDECL", // 148, "MSG_ELEMENT_TYPE_REQUIRED_IN_ELEMENTDECL"
470
"MSG_ELEMENT_TYPE_REQUIRED_IN_MIXED_CONTENT", // 149, "MSG_ELEMENT_TYPE_REQUIRED_IN_MIXED_CONTENT"
471
"MSG_MARKUP_NOT_RECOGNIZED_IN_DTD", // 150, "MSG_MARKUP_NOT_RECOGNIZED_IN_DTD"
472
"AttributeValueUnterminated", // 151, "MSG_ATTRIBUTE_VALUE_UNTERMINATED"
473
"MSG_OPEN_PAREN_OR_ELEMENT_TYPE_REQUIRED_IN_CHILDREN", // 152, "MSG_OPEN_PAREN_OR_ELEMENT_TYPE_REQUIRED_IN_CHILDREN"
474
"MSG_ROOT_ELEMENT_TYPE_REQUIRED", // 153, "MSG_ROOT_ELEMENT_TYPE_REQUIRED"
475
"MSG_SPACE_REQUIRED_AFTER_PUBIDLITERAL_IN_EXTERNALID", // 154, "MSG_SPACE_REQUIRED_AFTER_PUBIDLITERAL_IN_EXTERNALID"
476
"MSG_SPACE_REQUIRED_BEFORE_CONTENTSPEC_IN_ELEMENTDECL", // 155, "MSG_SPACE_REQUIRED_BEFORE_CONTENTSPEC_IN_ELEMENTDECL"
477
"MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ELEMENTDECL", // 156, "MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ELEMENTDECL"
478
"MSG_SPACE_REQUIRED_BEFORE_NOTATION_NAME_IN_UNPARSED_ENTITYDECL", // 157, "MSG_SPACE_REQUIRED_BEFORE_NOTATION_NAME_IN_UNPARSED_ENTITYDECL"
479
"MSG_SPACE_REQUIRED_BEFORE_PUBIDLITERAL_IN_EXTERNALID", // 158, "MSG_SPACE_REQUIRED_BEFORE_PUBIDLITERAL_IN_EXTERNALID"
480
"MSG_SPACE_REQUIRED_BEFORE_ROOT_ELEMENT_TYPE_IN_DOCTYPEDECL", // 159, "MSG_SPACE_REQUIRED_BEFORE_ROOT_ELEMENT_TYPE_IN_DOCTYPEDECL"
481
"MSG_SPACE_REQUIRED_BEFORE_SYSTEMLITERAL_IN_EXTERNALID", // 160, "MSG_SPACE_REQUIRED_BEFORE_SYSTEMLITERAL_IN_EXTERNALID"
482
"ReferenceNotInOneEntity", // 161, "MSG_REFERENCE_NOT_IN_ONE_ENTITY"
483
"CommentNotInOneEntity", // 162, "MSG_COMMENT_MUST_BEGIN_AND_END_IN_THE_SAME_ENTITY"
484
"CommentUnterminated", // 163, "MSG_COMMENT_UNTERMINATED"
485
"PIUnterminated", // 164, "MSG_PI_UNTERMINATED"
486
"PINotInOneEntity", // 165, "MSG_PI_MUST_BEGIN_AND_END_IN_THE_SAME_ENTITY"
487
"ReferenceUnterminated", // 166, "MSG_REFERENCE_UNTERMINATED"
488
"PrefixDeclared", // 167, "MSG_PREFIX_DECLARED"
489
"MSG_ATT_DEFAULT_INVALID", // 168, "MSG_ATT_DEFAULT_INVALID"
490
"MSG_GENERIC_SCHEMA_ERROR", // 169 "MSG_GENERIC_SCHEMA_ERROR"
491
"MSG_DTD_SCHEMA_ERROR", // 170
492
"NamespaceNameEmpty", // 171, "MSG_NAMESPACE_NAME_EMPTY"
493
// ...
494
"" //
495
};
496
497     public static final int
498         VC_ROOT_ELEMENT_TYPE = 1, // 2.8 VC: Root Element Type
499
VC_IDREF = 2, // 3.3.1 VC: IDREF
500
VC_NAME_TOKEN = 3, // 3.3.1 VC: Name Token
501
P17_RESERVED_PITARGET = 4, // 2.6 [17] PITarget matching [Xx][Mm][Ll] is reserved
502
P16_WHITESPACE_REQUIRED = 5, // 2.6 [16] White space required between PITarget and data
503
P16_INVALID_CHARACTER = 6, // 2.6 [16] Invalid character in PI data
504
P15_DASH_DASH = 7, // 2.5 [15] The string "--" must not occur within comments
505
P15_INVALID_CHARACTER = 8, // 2.5 [15] Invalid character in comment
506
WFC_LEGAL_CHARACTER = 9, // 4.1 [66] WFC: Legal Character
507
P10_INVALID_CHARACTER = 10, // 2.3 [10] Invalid character in AttValue
508
WFC_NO_LESSTHAN_IN_ATTVALUE = 11, // 3.1 [41] WFC: No < in Attribute Values
509
P10_QUOTE_REQUIRED = 12, // 2.3 [10] No quote delimiter in AttValue
510
P68_NAME_REQUIRED = 13, // 4.1 [68] Name missing in EntityRef
511
P68_SEMICOLON_REQUIRED = 14, // 4.1 [68] An EntityRef must end with a ';'
512
P66_DIGIT_REQUIRED = 15, // 4.1 [66] A "&#" CharRef must contain at least one decimal digit
513
P66_HEXDIGIT_REQUIRED = 16, // 4.1 [66] A "&#x" CharRef must contain at least one hexadecimal digit
514
P66_SEMICOLON_REQUIRED = 17, // 4.1 [66] A CharRef must end with a ';'
515
P11_QUOTE_REQUIRED = 18, // 2.3 [11] No quote delimiter in SystemLiteral
516
P11_INVALID_CHARACTER = 19, // 2.3 [11] Invalid character in SystemLiteral
517
P12_QUOTE_REQUIRED = 20, // 2.3 [12] No quote delimiter in PubidLiteral
518
P12_INVALID_CHARACTER = 21, // 2.3 [12] Invalid character in PubidLiteral
519
P62_UNTERMINATED = 22, // 3.4 [62] Included conditional sections must end with "]]>"
520
P63_UNTERMINATED = 23, // 3.4 [63] Excluded conditional sections must end with "]]>"
521
P65_INVALID_CHARACTER = 24, // 3.4 [64] Invalid character in excluded conditional section
522
P40_UNTERMINATED = 25, // 3.1 [40] Element type must be followed by attributes, ">" or "/>"
523
P41_EQ_REQUIRED = 26, // 3.1 [41] Attribute name must be followed by an '=' character
524
WFC_UNIQUE_ATT_SPEC = 27, // 3.1 [40] [44] Attribute must only appear once
525
P77_ENCODINGDECL_REQUIRED = 28, // 4.3.1 [77] The encoding declaration is not optional
526
P23_VERSIONINFO_REQUIRED = 29, // 2.8 [23] The version is not optional
527
P24_EQ_REQUIRED = 30, // 2.8 [24] An '=' is required after the version
528
P32_EQ_REQUIRED = 31, // 2.9 [32] An '=' is required in a standalone document declaration
529
P80_EQ_REQUIRED = 32, // 4.3.3 [80] An '=' is required in an encoding declaration
530
P24_QUOTE_REQUIRED = 33, // 2.8 [24] The version is a quoted string
531
P32_QUOTE_REQUIRED = 34, // 2.9 [32] The standalone document declaration value is a quoted string
532
P80_QUOTE_REQUIRED = 35, // 4.3.3 [80] The encoding name value is a quoted string
533
P26_INVALID_CHARACTER = 36, // 2.8 [26] The version contained an invalid XML character
534
P32_INVALID_CHARACTER = 37, // 2.9 [32] The standalone document declaration value contained an invalid XML character
535
P81_INVALID_CHARACTER = 38, // 4.3.3 [81] The encoding name value contained an invalid XML character
536
P26_INVALID_VALUE = 39, // 2.8 [26] The version was not in the correct format
537
P26_NOT_SUPPORTED = 40, // 2.8 [26] The version specified is not supported
538
P80_WHITESPACE_REQUIRED = 41, // 4.3.3 [80] Whitespace required between version and encoding
539
P81_INVALID_VALUE = 42, // 4.3.3 [81] The encoding name value was not in the correct format
540
P32_INVALID_VALUE = 43, // 2.9 [32] The standalone document declaration value was not "yes" or "no"
541
P23_UNTERMINATED = 44, // 2.8 [23] An XML declaration must end with "?>"
542
P77_UNTERMINATED = 45, // 4.3.1 [77] A text declaration must end with "?>"
543
P28_INVALID_CHARACTER = 46, // 2.8 [28] Invalid character in the internal subset of the DTD
544
P30_INVALID_CHARACTER = 47, // 2.8 [30] Invalid character in the external subset or an external entity within DTD
545
P9_INVALID_CHARACTER = 48, // 2.3 [9] Invalid character in EntityValue
546
P51_UNTERMINATED = 49, // 3.2.2 [51] Mixed content model with element types must end with ")*"
547
P69_NAME_REQUIRED = 50, // 4.1 [69] Name missing in PEReference
548
P69_SEMICOLON_REQUIRED = 51, // 4.1 [69] An PEReference must end with a ';'
549
P75_INVALID = 52, // 4.2.2 [75] An ExternalId must begin with either "SYSTEM" or "PUBLIC"
550
WFC_PES_IN_INTERNAL_SUBSET = 53, // 2.8 [28] PEReferences in the internal subset cannot occur within markup declarations
551
P22_INVALID_CHARACTER = 54, // 2.8 [22] Invalid character in prolog
552
P27_INVALID_CHARACTER = 55, // 2.8 [27] Invalid character in Misc
553
P20_INVALID_CHARACTER = 56, // 2.7 [20] Invalid character in CDSect
554
P43_INVALID_CHARACTER = 57, // 3.1 [43] Invalid character in content
555
P39_UNTERMINATED = 58, // 3 [39] Element type must be followed by attributes, ">" or "/>"
556
P42_UNTERMINATED = 59, // 3.1 [42] end-tag must end with '>'
557
P81_NOT_SUPPORTED = 60, // 4.3.3 [81] The encoding is not supported
558
WFC_ENTITY_DECLARED = 61, // 4.1 [68] The entity was referenced, but not declared
559
VC_ENTITY_DECLARED = 62, // 4.1 [68] The entity was referenced, but not declared
560
WFC_PARSED_ENTITY = 63, // 4.1 [68] An unparsed entity was referenced
561
WFC_NO_EXTERNAL_ENTITY_REFERENCES = 64, // 3.1 [42] reference to external entity in AttValue
562
// xml:lang no longer checked http://www.w3.org/XML/xml-19980210-errata#E73
563
P33_INVALID = 65, // 2.12 [33] xml:lang attribute value must match LanguageID production
564
P18_UNTERMINATED = 66, // 2.7 [18] CDATA sections must end with "]]>"
565
VC_NO_DUPLICATE_TYPES = 67, // 3.2.2 [51] The same type must not appear more than once in a mixed content declaration
566
P78_NOT_WELLFORMED = 68, // 4.3.2 [78]
567
VC_ID_ATTRIBUTE_DEFAULT = 69, // 3.3.1 [54]
568
P53_NAME_REQUIRED = 70, // 3.3 [53]
569
P53_ATTTYPE_REQUIRED = 71, // 3.3 [53]
570
P81_REQUIRED = 72, // 4.3.3 [81]
571
WFC_NO_RECURSION = 73, // 4.1 [68]
572
VC_PROPER_DECLARATION_PE_NESTING = 74, // 2.8 [29]
573
VC_PROPER_GROUP_PE_NESTING = 75, // 3.2.1 [47]
574
VC_ID = 76, // 3.3.1 [56]
575
VC_ENTITY_NAME = 77, // 3.3.1 [56]
576
VC_ATTRIBUTE_VALUE_TYPE = 78, // 3.1 [41]
577
VC_ELEMENT_VALID = 79, // 3 [39]
578
VC_STANDALONE_DOCUMENT_DECLARATION = 80, // 2.9 [32]
579
VC_ONE_ID_PER_ELEMENT_TYPE = 81, // 3.3.1 [56]
580
VC_UNIQUE_ELEMENT_TYPE_DECLARATION = 82, // 3.2 [45]
581
P45_UNDECLARED_ELEMENT_IN_CONTENTSPEC = 83, // 3.2 [45]
582

583         VC_NOTATION_ATTRIBUTES = 84,
584         P53_DUPLICATE = 85,
585         VC_ENUMERATION = 86,
586         VC_FIXED_ATTRIBUTE_DEFAULT = 87,
587         VC_REQUIRED_ATTRIBUTE = 88,
588         VC_NOTATION_DECLARED = 89,
589         P58_NAME_REQUIRED = 90,
590         P58_UNTERMINATED = 91,
591         P59_NMTOKEN_REQUIRED = 92,
592         P59_UNTERMINATED = 93,
593         P70_SPACE = 94,
594         P70_REQUIRED_NAME = 95,
595         P70_REQUIRED_SPACE = 96,
596         P71_UNTERMINATED = 97,
597         P72_SPACE = 98,
598         P72_UNTERMINATED = 99,
599         P76_REQUIRED = 100,
600         P82_NAME_REQUIRED = 101,
601         P82_SPACE_REQUIRED = 102,
602         P82_UNTERMINATED = 103,
603         P14_INVALID = 104,
604         P16_PITARGET_REQUIRED = 105,
605         P16_REQUIRED = 106,
606         P1_ELEMENT_REQUIRED = 107,
607         P22_NOT_RECOGNIZED = 108,
608         P27_NOT_RECOGNIZED = 109,
609         P43_NOT_RECOGNIZED = 110,
610         P52_ELEMENT_TYPE_REQUIRED = 111,
611         P52_SPACE_REQUIRED = 112,
612         P53_SPACE_REQUIRED = 113,
613         P58_OPEN_PAREN_REQUIRED = 114,
614         P58_SPACE_REQUIRED = 115,
615         P60_SPACE_REQUIRED = 116,
616         S2_10_DECLARATION_ILLEGAL = 117,
617         P39_ELEMENT_TYPE_REQUIRED = 118,
618         P28_ROOT_ELEMENT_TYPE_REQUIRED = 119,
619         P28_SPACE_REQUIRED = 120,
620         P28_UNTERMINATED = 121,
621         P29_NOT_RECOGNIZED = 122,
622         P45_CONTENTSPEC_REQUIRED = 123,
623         P45_ELEMENT_TYPE_REQUIRED = 124,
624         P45_SPACE_REQUIRED = 125,
625         P45_UNTERMINATED = 126,
626         P47_CLOSE_PAREN_REQUIRED = 127,
627         P47_OPEN_PAREN_OR_ELEMENT_TYPE_REQUIRED = 128,
628         P51_CLOSE_PAREN_REQUIRED = 129,
629         P51_ELEMENT_TYPE_REQUIRED = 130,
630         P75_SPACE_REQUIRED = 131,
631         P76_SPACE_REQUIRED = 132,
632         P15_UNTERMINATED = 133,
633         P16_UNTERMINATED = 134,
634         P67_UNTERMINATED = 135,
635         P10_UNTERMINATED = 136,
636         P22_XMLDECL_MUST_BE_FIRST = 137,
637         P30_TEXTDECL_MUST_BE_FIRST = 138,
638         P5_INVALID_CHARACTER = 139,
639         P11_UNTERMINATED = 140,
640         P12_UNTERMINATED = 141,
641         P11_URI_FRAGMENT = 142,
642         VC_ONE_NOTATION_PER_ELEMENT_TYPE = 143,
643         NC_PREFIX_DECLARED = 144,
644         VC_ATTRIBUTE_DEFAULT_LEGAL = 145,
645         SCHEMA_GENERIC_ERROR = 146,
646         NC_NAMESPACE_NAME_EMPTY = 147,
647         
648         // ...
649
CONSTRAINT_MAX_CODE = 200;
650
651 /*
652     private static final Constraint[] fgConstraints = {
653         new Constraint(null, null, null, null),
654     // VC_ROOT_ELEMENT_TYPE = 1
655         new Constraint("2.8", "", "2.8 VC: Root Element Type",
656                        "Validity Constraint: Root Element Type\n" +
657                        "The Name in the document type declaration must match the element type of the\n" +
658                        "root element."),
659     // VC_IDREF = 2
660         new Constraint("3.3.1 2.3", "[56] [6]", "3.3.1 VC: IDREF",
661                        "Validity Constraint: IDREF\n" +
662                        "[56] TokenizedType ::= 'ID' | 'IDREF' | 'IDREFS' | 'ENTITY' | 'ENTITIES' | 'NMTOKEN' | 'NMTOKENS'\n" +
663                        "Values of type IDREF must match the Name production, and values of type\n" +
664                        "IDREFS must match Names; each Name must match the value of an ID attribute\n" +
665                        "on some element in the XML document; i.e. IDREF values must match the value\n" +
666                        "of some ID attribute."),
667     // VC_NAME_TOKEN = 3
668         new Constraint("3.3.1 2.3", "[56] [8]", "3.3.1 VC: Name Token",
669                        "Validity Constraint: Name Token\n" +
670                        "Values of type NMTOKEN must match the Nmtoken production; values of type\n" +
671                        "NMTOKENS must match Nmtokens."),
672     // P17_RESERVED_PITARGET = 4
673         new Constraint("2.6", "[17]", "2.6 [17] PITarget ::= Name - (('X' | 'x') ('M' | 'm') ('L' | 'l'))",
674                        "[17] PITarget ::= Name - (('X' | 'x') ('M' | 'm') ('L' | 'l'))\n" +
675                        "The target names \"XML\", \"xml\", and so on are reserved for standardization\n" +
676                        "in this or future versions of this specification."),
677     // P16_WHITESPACE_REQUIRED = 5
678         new Constraint("2.6 2.3", "[16] [3]", "2.6 [16] PI ::= '<?' PITarget (S (Char* - (Char* '?>' Char*)))? '?>'",
679                        "[16] PI ::= '<?' PITarget (S (Char* - (Char* '?>' Char*)))? '?>'\n" +
680                        "[3] S ::= (#x20 | #x9 | #xD | #xA)+\n" +
681                        "White space is required between the PITarget and any additional characters\n" +
682                        "that are to be passed through to the application."),
683     // P16_INVALID_CHARACTER = 6
684         new Constraint("2.6 2.2", "[16] [2]", "2.6 [2] PI ::= '<?' PITarget (S (Char* - (Char* '?>' Char*)))? '?>'",
685                        "[16] PI ::= '<?' PITarget (S (Char* - (Char* '?>' Char*)))? '?>'\n" +
686                        "[2] Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]\n" +
687                        "Processing instruction data is required to contain legal XML characters."),
688     // P15_DASH_DASH = 7
689         new Constraint("2.5", "[15]", "2.5 [15] Comment ::= '<!--' ((Char - '-') | ('-' (Char - '-')))* '-->'",
690                        "[15] Comment ::= '<!--' ((Char - '-') | ('-' (Char - '-')))* '-->'\n" +
691                        "For compatibility, the string \"--\" (double-hyphen) must not occur within comments."),
692    &nbs