![]() | InDesign SDK 20.5 |
#include <XMLDTDValidationError.h>
Public Member Functions | |
| XMLDTDValidationError (ErrorCode errCode, const XMLReference &xmlReference, const PMString &attName=PMString()) | |
| XMLDTDValidationError (const XMLDTDValidationError &src) | |
| virtual | ~XMLDTDValidationError () |
| bool | operator== (const XMLDTDValidationError &) const |
| XMLDTDValidationError & | operator= (const XMLDTDValidationError &src) |
| ErrorCode | GetErrorCode (void) const |
| const XMLReference & | GetXMLReference (void) const |
| const PMString & | GetAttributeName (void) const |
| const K2Vector < XMLDTDValidateSuggest * > & | GetSuggestions (void) const |
| void | AddSuggestion (XMLDTDValidateSuggest *suggestion) |
Class for a single error during XML DTD validation. Each error consists of an error code, a XMLReference of where the error occurred (or base XMLReference), and a list of correction suggestions.
| XMLDTDValidationError::XMLDTDValidationError | ( | ErrorCode | errCode, |
| const XMLReference & | xmlReference, | ||
| const PMString & | attName = PMString() | ||
| ) |
XML DTD validation error codes. internal errors:
kXMLInvalidDTDXMLReferenceErr invalid DTD XMLReference. Unable to obtain the element that contains the DTD
kXMLNILDTDErr NIL DTD
general errors:
kXMLInvalidNMTokenErr REC-xml-20001006, [7]: invalid Nmtoken
kXMLInvalidNameTokenErr REC-xml-20001006, [5]: invalid name token
element errors:
kXMLBadRootElementTypeErr REC-xml-20001006, 2.8: root element tag must match DOCTYPE declaration's element type
kXMLEMPTYElementWithContentErr REC-xml-20001006, 3: EMPTY element cannot have content
kXMLUnexpectedElementErr REC-xml-20001006, 3: element that is not part of a content model was found
kXMLMissingElementErr REC-xml-20001006, 3: element required by the content model was not found
kXMLUndeclaredElementErr REC-xml-20001006, 3: undeclared element found
attribute errors:
kXMLMissingRequiredAttributeErr REC-xml-20001006, 3.3.2: missing required attribute. An attribute declared as #REQUIRED default value is not found
kXMLExtraAttributeErr REC-xml-20001006, 3.1: extra attribute. Element contains an attribute that is not declared as part of the element in the DTD
kXMLNotUnparsedEntityInAttValueErr REC-xml-20001006, 3.3.1: REC-xml-20001006, 3.3.1: value in an attribute declared as ENTITY type must match an unparsed entity in the DTD. The attribute value does not refer to an unparsed entity
kXMLUndeclaredEntityInAttValueErr REC-xml-20001006, 3.3.1: REC-xml-20001006, 3.3.1: value in an attribute declared as ENTITY type must match an unparsed entity in the DTD. An undeclared entity was found
kXMLUndeclaredNotationInAttValueErr REC-xml-20001006, 3.3.1: the value of NOTATION attribute must match a declared notation. An undeclared notation was found in an attribute value
kXMLAttValueNotInEnumErr REC-xml-20001006, 3.3.1: values of enumerated type must match one of the nmtokens in the declaration. The attribute value does not match one of the values in the enumeration list
kXMLDuplicateIDAttValueErr REC-xml-20001006, 3.3.1: an ID name must not appear more than once in a XML document as a value of ID type. Another element was found to have ID attribute type with the same value
kXMLFixedAttributeDefaultErr REC-xml-20001006, 3.3.2: if attribute default value declaration is #FIXED, the attribute value must be the same as declared default value. The attribute value is not the same as declared default value
kXMLIDNotFoundErr REC-xml-20001006, 3.3.1: value of IDREF must match some ID attribute. The ID referred to by the attribute value was not found
kXMLNoContentModelErr no content model found in the DTD. Possibly empty DTDconstructor
| errCode | error code XMLReference of the element the error occurred at attribute name the error occurred at, if applicable |
| XMLDTDValidationError::XMLDTDValidationError | ( | const XMLDTDValidationError & | src | ) |
copy constructor
| virtual |
destructor
| void XMLDTDValidationError::AddSuggestion | ( | XMLDTDValidateSuggest * | suggestion | ) |
add a suggestion to this error
| suggestion | suggestion to add. This owns the object |
| const PMString& XMLDTDValidationError::GetAttributeName | ( | void | ) | const |
if applicable, this method returns the name of the attribute for element, returned in GetXMLReference, which the error occurred at. If empty, then the error is not at an attribute
| ErrorCode XMLDTDValidationError::GetErrorCode | ( | void | ) | const |
get the error code
| const K2Vector<XMLDTDValidateSuggest*>& XMLDTDValidationError::GetSuggestions | ( | void | ) | const |
get the list of suggestions
| const XMLReference& XMLDTDValidationError::GetXMLReference | ( | void | ) | const |
get the XMLReference of the error element
| XMLDTDValidationError& XMLDTDValidationError::operator= | ( | const XMLDTDValidationError & | src | ) |
operator= required for vector of this class to work properly in erase()