How do I Choose Between the Dynamic Type Substitution and Static Element Replacement?
Both dynamic type substitution and static element replacement have advantages and disadvantages.
The dynamic type substitution has distinct advantages.
o The main advantage of dynamic type substitution is that it achieves the desired element replacement without requiring definition of as many derived types in the extension schema.
o Another advantage of dynamic type substitution is keeping the original element name and path. Even if other users don't understand your local “CourtOrderNarrative” extension, they can still process the original "CourtActivityCourtOrder" because it has the same name and same path as expected.
However, dynamic type substitution also has several disadvantages.
o The complete definition of the containing types is unknown until instances are created.
o The schema designer has to describe where type substitution is required in a non-schema artifact, which makes it difficult to use the schema as the basis for exchange.
o Many common XML tools and messaging infrastructure do not support type substitution in some instances.
The advantages and disadvantages of static element replacement are the opposite of dynamic type substitution. Static element replacement results in more derived types in the extension schema and enjoys broader infrastructure support. However, the schema can be used as a more complete definition of the IEP structure, making the semantics clear and explicit.