Chapter 04: Schema composition ============================== Example 4-1 Include ------------------- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter04/example04011.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter04/example04011.py :language: python Example 4-1.2 Include --------------------- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter04/example04012.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter04/example04012.py :language: python Example 4-2 Chameleon include ----------------------------- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter04/example04021.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter04/example04021.py :language: python Example 4-2.2 Chameleon include ------------------------------- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter04/example04022.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter04/example04022.py :language: python Example 4-3 Import ------------------ .. literalinclude:: /../tests/fixtures/defxmlschema/chapter04/example04031.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter04/example04031.py :language: python Example 4-3.2 Import -------------------- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter04/example04032.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter04/example04032.py :language: python Example 4-5 Multiple imports of the same namespace -------------------------------------------------- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter04/example04051.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter04/example04051.py :language: python Example 4-5.2 Multiple imports of the same namespace ---------------------------------------------------- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter04/example04052.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter04/example04052.py :language: python Example 4-5.3 Multiple imports of the same namespace ---------------------------------------------------- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter04/example04053.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter04/example04053.py :language: python Example 4-6 Proxy schema to avoid multiple imports -------------------------------------------------- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter04/example04061.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter04/example04061.py :language: python Example 4-6.2 Proxy schema to avoid multiple imports ---------------------------------------------------- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter04/example04062.xsd :language: xml :lines: 3- .. warning:: Illegal definition Example 4-7 Illegal duplication of element names ------------------------------------------------ .. literalinclude:: /../tests/fixtures/defxmlschema/chapter04/example04071.xsd :language: xml :lines: 3- .. warning:: Illegal definition Example 4-7.2 Illegal duplication of element names -------------------------------------------------- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter04/example04072.xsd :language: xml :lines: 3- .. warning:: Illegal definition Example 4-8 Illegal Missing component ------------------------------------- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter04/example0408.xsd :language: xml :lines: 3- .. warning:: Illegal definition .. admonition:: Samples Source :class: hint `Definitive XML Schema `_ by Priscilla Walmsley (c) 2012 Prentice Hall PTR