metacat accepts invalid documents
Currently, the metacat servlet accepts documents that are not valid according to
their type. We need to change this behavior so that these documents are
rejected fromthe server. The only way to save a document that is invalid is to
remove the DOCTYPE assertion that the document is of a certain type. Thus, we
can save only "typeless" documents (with no Public ID) and "typed" documents
that are valid according to the DTD referenced by their Public ID.
This change will make metadata more predictable and therefore applications that
depend on metadata contents more reliable. It will require changes to the
various clients (web, java) to deal with the newly rejected documents.
#1 Updated by Jivka Bojilova over 19 years ago
1. Turned on the validation in order only valid xml docs comformed to the
specified dtd (if any) to be submitted in metacat
2. With validation "on" white spaces are reported from ignorableWhitespace()
callback, not from characters() (as with validation "off")
Thus included insert of whitespaces from ignorableWhitespace()
3. If document have been rejected from submission, client could submit it again
by removing the DOCTYPE declaration. Thus only "typeless" documents (with no
Public ID) or "typed" documents that are valid according to the DTD referenced
by their Public ID can be saved.