XML Substitution groups are very heavily used within NIEM. Within the XSD.exe, there is an issue where substitution groups will not always serialize when members in a namespace are different from the one the substitution group head has declared. This issue will manifest itself during testing with unexpected exceptions occurring because of null values in the rendered classes.
Note that the circumstances where a substitution group member will or will not serialize is somewhat dependent on the overall complexity of the IEPD, however, they can be broken down into the following scenarios:
1. A substitution group with a head element & members in different namespaces
2. Substitution group without head and extension types in different namespace.
For more details on these two scenarios, please see the full article at
Source: IJIS Technical Advisory Committee NIEM FAQ Series "NIEM IEPD XML Code Generation in C# with .NET 3.5"; see article ID# 547