********** Chapter 18 ********** Redefining and overriding schema components =========================================== Example 18-1 A simple redefinition ********************************** .. literalinclude:: /../tests/fixtures/defxmlschema/chapter18/example18011.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter18/example18011.py :language: python Example 18-1 A simple redefinition ********************************** .. literalinclude:: /../tests/fixtures/defxmlschema/chapter18/example18012.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter18/example18012.py :language: python Example 18-2 Redefining a simple type ************************************* .. literalinclude:: /../tests/fixtures/defxmlschema/chapter18/example18021.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter18/example18021.py :language: python Example 18-2 Redefining a simple type ************************************* .. literalinclude:: /../tests/fixtures/defxmlschema/chapter18/example18022.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter18/example18022.py :language: python Example 18-3 Redefining a complex type ************************************** .. literalinclude:: /../tests/fixtures/defxmlschema/chapter18/example18031.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter18/example18031.py :language: python Example 18-3 Redefining a complex type ************************************** .. literalinclude:: /../tests/fixtures/defxmlschema/chapter18/example18032.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter18/example18032.py :language: python Example 18-4 Redefining a named model group as a subset ******************************************************* .. literalinclude:: /../tests/fixtures/defxmlschema/chapter18/example18041.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter18/example18041.py :language: python Example 18-4 Redefining a named model group as a subset ******************************************************* .. literalinclude:: /../tests/fixtures/defxmlschema/chapter18/example18042.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter18/example18042.py :language: python Example 18-5 Redefining a named model group as a superset ********************************************************* .. literalinclude:: /../tests/fixtures/defxmlschema/chapter18/example18051.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter18/example18051.py :language: python Example 18-5 Redefining a named model group as a superset ********************************************************* .. literalinclude:: /../tests/fixtures/defxmlschema/chapter18/example18052.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter18/example18052.py :language: python Example 18-6 Redefining an attribute group as a subset ****************************************************** .. literalinclude:: /../tests/fixtures/defxmlschema/chapter18/example18061.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter18/example18061.py :language: python Example 18-6 Redefining an attribute group as a subset ****************************************************** .. literalinclude:: /../tests/fixtures/defxmlschema/chapter18/example18062.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter18/example18062.py :language: python Example 18-7 Redefining an attribute group as a superset ******************************************************** .. literalinclude:: /../tests/fixtures/defxmlschema/chapter18/example18071.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter18/example18071.py :language: python Example 18-7 Redefining an attribute group as a superset ******************************************************** .. literalinclude:: /../tests/fixtures/defxmlschema/chapter18/example18072.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter18/example18072.py :language: python Example 18-8 A simple override ****************************** .. literalinclude:: /../tests/fixtures/defxmlschema/chapter18/example18081.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter18/example18081.py :language: python Example 18-8 A simple override ****************************** .. literalinclude:: /../tests/fixtures/defxmlschema/chapter18/example18082.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter18/example18082.py :language: python Example 18-9 Overriding a simple type ************************************* .. literalinclude:: /../tests/fixtures/defxmlschema/chapter18/example18091.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter18/example18091.py :language: python Example 18-9 Overriding a simple type ************************************* .. literalinclude:: /../tests/fixtures/defxmlschema/chapter18/example18092.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter18/example18092.py :language: python Example 18-10 Overriding a complex type *************************************** .. literalinclude:: /../tests/fixtures/defxmlschema/chapter18/example18101.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter18/example18101.py :language: python Example 18-10 Overriding a complex type *************************************** .. literalinclude:: /../tests/fixtures/defxmlschema/chapter18/example18102.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter18/example18102.py :language: python Example 18-11 Overriding element and attribute declarations *********************************************************** .. literalinclude:: /../tests/fixtures/defxmlschema/chapter18/example18111.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter18/example18111.py :language: python Example 18-11 Overriding element and attribute declarations *********************************************************** .. literalinclude:: /../tests/fixtures/defxmlschema/chapter18/example18112.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter18/example18112.py :language: python Example 18-12 Overriding named groups ************************************* .. literalinclude:: /../tests/fixtures/defxmlschema/chapter18/example18121.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter18/example18121.py :language: python Example 18-12 Overriding named groups ************************************* .. literalinclude:: /../tests/fixtures/defxmlschema/chapter18/example18122.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter18/example18122.py :language: python Example 18-13 Risks of overriding types *************************************** .. literalinclude:: /../tests/fixtures/defxmlschema/chapter18/example18131.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter18/example18131.py :language: python Example 18-13 Risks of overriding types *************************************** .. literalinclude:: /../tests/fixtures/defxmlschema/chapter18/example18132.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter18/example18132.py :language: python .. admonition:: Samples Source :class: hint `Definitive XML Schema `_ by Priscilla Walmsley (c) 2012 Prentice Hall PTR