********** Chapter 16 ********** Substitution groups =================== Binding Test ************ **Schema** .. literalinclude:: /../tests/fixtures/defxmlschema/chapter16/chapter16.xsd :language: xml :lines: 2- **XML Document** .. literalinclude:: /../tests/fixtures/defxmlschema/chapter16/chapter16.xml :language: xml :lines: 2- **xsData XML Document** .. literalinclude:: /../tests/fixtures/defxmlschema/chapter16/chapter16.xsdata.xml :language: xml :lines: 2- **xsData JSON** .. literalinclude:: /../tests/fixtures/defxmlschema/chapter16/chapter16.json :language: json Example 16-1 The head of a substitution group ********************************************* .. literalinclude:: /../tests/fixtures/defxmlschema/chapter16/example1601.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter16/example1601.py :language: python Example 16-2 Members of a substitution group ******************************************** .. literalinclude:: /../tests/fixtures/defxmlschema/chapter16/example1602.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter16/example1602.py :language: python Example 16-4 Substitution group with simple types ************************************************* .. literalinclude:: /../tests/fixtures/defxmlschema/chapter16/example1604.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter16/example1604.py :language: python Example 16-5 A member of two substitution groups ************************************************ .. literalinclude:: /../tests/fixtures/defxmlschema/chapter16/example1605.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter16/example1605.py :language: python Example 16-6 Using a choice group ********************************* .. literalinclude:: /../tests/fixtures/defxmlschema/chapter16/example1606.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter16/example1606.py :language: python Example 16-7 Defining derived types *********************************** .. literalinclude:: /../tests/fixtures/defxmlschema/chapter16/example1607.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter16/example1607.py :language: python Example 16-9 Using final to control substitution group declaration ****************************************************************** .. literalinclude:: /../tests/fixtures/defxmlschema/chapter16/example1609.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter16/example1609.py :language: python Example 16-10 Using block to prevent substitution group use *********************************************************** .. literalinclude:: /../tests/fixtures/defxmlschema/chapter16/example1610.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter16/example1610.py :language: python .. admonition:: Samples Source :class: hint `Definitive XML Schema `_ by Priscilla Walmsley (c) 2012 Prentice Hall PTR