Within the Volantisized XERCES SAX parser implementation, XSD and DTD errors are generated using messages defined in the following resource bundles:
The sequencing of error notifications to SAX events is:
Each supported error must be handled by getting the message string out of the resource bundle (accounting for any localization). Each parameter substitution must then be converted into a regular expression marker such as ".*", resulting an an "error template". When processing a given error report, the error string must be processed (via a regular expression matcher) against each available "error template". The regular expression markers can be used to populate the (optional) element name, (optional) attribute name and (optional) constraint name parameters.
The SAX model uses character and line number information to locate errors. This is not adequate for our purposes. What is actually required is a fully qualified, explicitly defined, absolute XPath.
The ContentHandler aspect of this class must maintain the notion of the current XPath, including any predication of element and text nodes. It should maintain as little state data as possible (essentially only maintaining state for the elements in the "branch" that is currently being processed.)
All sequential characters events must be deemed to be for the name text node.
|
|