1
/* xml_error.h - Error codes for XML parsing/validation.
2
Copyright (c) 2008, Robert D. Cameron and Dan Lin.
3
Licensed to the public under the Open Software License 3.0.
4
Licensed to International Characters, Inc., under the Academic
7
The following enum provides codes for the well-formedness (wfErr)
8
and validity (vErr) constraints of XML, based on the ids for those
9
constraints in the REC-xml-20060816.xml document. The ids may be
10
recovered by stripping wfErr_ or vc_Err and substituting "-" for "_".
16
wfErr_wfc_PEinInternalSubset,
18
wfErr_PE_between_Decls,
29
vErr_vc_PEinMarkupDecl,
35
vErr_vc_MixedChildrenUnique,
45
vErr_NoDuplicateTokens,
53
vErr_UniqueNotationName};
55
const char * XML_Constraint_Strings[] = {
56
"wfc-PEinInternalSubset",
75
"vc-MixedChildrenUnique",
93
"UniqueNotationName"};
95
/* The following enum provides codes for XML nonterminals using
96
codes in the REC-xml-20060816.xml document. The ids may be
97
recovered by substituting "-" for "_".
100
enum XML_NonTerminal {
160
NT_ignoreSectContents,
186
const char * XML_NonTerminal_Names[] = {
197
"SystemLiteral [11]",
219
"extSubsetDecl [31]",
238
"TokenizedType [56]",
239
"EnumeratedType [57]",
243
"conditionalSect [61]",
246
"ignoreSectContents [64]",
268
"CombiningChar [87]",
272
void ShowConstraintError(XML_Constraint errCode);
274
void ShowSyntaxError(XML_NonTerminal errCode);
276
void NoEncodingError(char * msg);
278
void EncodingError(char * msg, unsigned char * encoding, int lgth);
280
void CharSetValidationError(char * encoding, int err_pos);
282
void XMLCharacterError(int err_pos);
284
void IncompleteCodeUnitError();
286
void DeclarationError(int pos);
288
void ImplementationLimitError(char * msg);
290
void ContentModelError();