********** Chapter 15 ********** Named groups ============ Binding Test ************ **Schema** .. literalinclude:: /../tests/fixtures/defxmlschema/chapter15/chapter15.xsd :language: xml :lines: 2- **XML Document** .. literalinclude:: /../tests/fixtures/defxmlschema/chapter15/chapter15.xml :language: xml :lines: 2- **xsData XML Document** .. literalinclude:: /../tests/fixtures/defxmlschema/chapter15/chapter15.xsdata.xml :language: xml :lines: 2- **xsData JSON** .. literalinclude:: /../tests/fixtures/defxmlschema/chapter15/chapter15.json :language: json Example 15-1 Named model group with local element declarations ************************************************************** .. literalinclude:: /../tests/fixtures/defxmlschema/chapter15/example1501.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter15/example1501.py :language: python Example 15-2 Named model group with element references ****************************************************** .. literalinclude:: /../tests/fixtures/defxmlschema/chapter15/example1502.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter15/example1502.py :language: python Example 15-4 Equivalent content model without a named model group reference *************************************************************************** .. literalinclude:: /../tests/fixtures/defxmlschema/chapter15/example1504.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter15/example1504.py :language: python Example 15-5 Group reference at the top level of the content model ****************************************************************** .. literalinclude:: /../tests/fixtures/defxmlschema/chapter15/example1505.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter15/example1505.py :language: python Example 15-6 Group with an all model group ****************************************** .. literalinclude:: /../tests/fixtures/defxmlschema/chapter15/example1506.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter15/example1506.py :language: python Example 15-7 Group reference from a group ***************************************** .. literalinclude:: /../tests/fixtures/defxmlschema/chapter15/example1507.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter15/example1507.py :language: python Example 15-8 Attribute group with local attribute declarations ************************************************************** .. literalinclude:: /../tests/fixtures/defxmlschema/chapter15/example1508.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter15/example1508.py :language: python Example 15-9 Attribute group with attribute references ****************************************************** .. literalinclude:: /../tests/fixtures/defxmlschema/chapter15/example1509.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter15/example1509.py :language: python Example 15-10 Attribute group with a wildcard ********************************************* .. literalinclude:: /../tests/fixtures/defxmlschema/chapter15/example1510.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter15/example1510.py :language: python Example 15-11 Referencing an attribute group from a complex type definition *************************************************************************** .. literalinclude:: /../tests/fixtures/defxmlschema/chapter15/example1511.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter15/example1511.py :language: python Example 15-12 Equivalent complex type without an attribute group **************************************************************** .. literalinclude:: /../tests/fixtures/defxmlschema/chapter15/example1512.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter15/example1512.py :language: python Example 15-14 Attribute group referencing an attribute group ************************************************************ .. literalinclude:: /../tests/fixtures/defxmlschema/chapter15/example1514.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter15/example1514.py :language: python Example 15-15 Default attribute group ************************************* .. literalinclude:: /../tests/fixtures/defxmlschema/chapter15/example1515.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter15/example1515.py :language: python Example 15-16 Named groups with a target namespace ************************************************** .. literalinclude:: /../tests/fixtures/defxmlschema/chapter15/example1516.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter15/example1516.py :language: python Example 15-17 Named groups across namespaces ******************************************** .. literalinclude:: /../tests/fixtures/defxmlschema/chapter15/example15171.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter15/example15171.py :language: python Example 15-17 Named groups across namespaces ******************************************** .. literalinclude:: /../tests/fixtures/defxmlschema/chapter15/example15172.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter15/example15172.py :language: python Example 15-18 Reusing content model fragments through derivation **************************************************************** .. literalinclude:: /../tests/fixtures/defxmlschema/chapter15/example1518.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter15/example1518.py :language: python .. admonition:: Samples Source :class: hint `Definitive XML Schema `_ by Priscilla Walmsley (c) 2012 Prentice Hall PTR