Chapter 4 XML Processing
Web Service Nonvalidated
Validating Only When Necessary
In other words, when you are both the producer and consumer of XML docu
ments, you may use validation as an assertion mechanism during development,
then turn off validation when in production. Additionally, during production vali
dation can be used as a diagnostic mechanism by setting up validation so that it is
triggered by fault occurrences.
4.5.5 Reduce the Cost of Referencing External Entities
Recall that an XML document may be the aggregation of assorted external entities,
and that these entities may need to be retrieved across the network when parsing. In
addition, the schema may also have to be retrieved from an external location. Exter
nal entities, including schemas, must be loaded and parsed even when they are not
being validated to ensure that the same information is delivered to the application
regardless of any subsequent validation. This is especially true with respect to
default values that may be specified in an incoming document schema.