Delen via


XSD gripe 3 - Substitution groups

I may be missing something here, but I really don't understand what problem/ scenarios the substitution group feature is trying to solve.

I am unclear why Substitution groups are even needed. If an element Foo is the same type or a derived type of an element Bar, it seems like that I should be able to freely substitute all I want without needing to statically declare the set.

Comments

  • Anonymous
    February 11, 2005
    You are kidding? Right?

    Substitution groups allow you to model element content where you allow having differently named elements that have a related but different structure.

    How would you express that otherwise (without introducing another construct that may be even more complex)?