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.2 A simple redefinition ------------------------------------ .. literalinclude:: /../tests/fixtures/defxmlschema/chapter18/example18012.xsd :language: xml :lines: 3- .. warning:: Unsupported feature! 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.2 Overriding a complex type ----------------------------------------- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter18/example18102.xsd :language: xml :lines: 3- .. warning:: XML Schema 1.1 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.2 Overriding element and attribute declarations ------------------------------------------------------------- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter18/example18112.xsd :language: xml :lines: 3- .. warning:: XML Schema 1.1 Example 18-12 Overriding named groups ------------------------------------- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter18/example18121.xsd :language: xml :lines: 3- .. warning:: Illegal definition Example 18-12.2 Overriding named groups --------------------------------------- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter18/example18122.xsd :language: xml :lines: 3- .. warning:: XML Schema 1.1 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.2 Risks of overriding types ----------------------------------------- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter18/example18132.xsd :language: xml :lines: 3- .. warning:: XML Schema 1.1 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.2 Redefining a simple type --------------------------------------- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter18/example18022.xsd :language: xml :lines: 3- .. warning:: Unsupported feature! 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.2 Redefining a complex type ---------------------------------------- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter18/example18032.xsd :language: xml :lines: 3- .. warning:: Illegal definition Example 18-4 Redefining a named model group as a subset ------------------------------------------------------- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter18/example18041.xsd :language: xml :lines: 3- .. warning:: Illegal definition Example 18-4.2 Redefining a named model group as a subset --------------------------------------------------------- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter18/example18042.xsd :language: xml :lines: 3- .. warning:: Illegal definition Example 18-5 Redefining a named model group as a superset --------------------------------------------------------- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter18/example18051.xsd :language: xml :lines: 3- .. warning:: Illegal definition Example 18-5.2 Redefining a named model group as a superset ----------------------------------------------------------- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter18/example18052.xsd :language: xml :lines: 3- .. warning:: Illegal definition Example 18-6 Redefining an attribute group as a subset ------------------------------------------------------ .. literalinclude:: /../tests/fixtures/defxmlschema/chapter18/example18061.xsd :language: xml :lines: 3- .. warning:: Illegal definition Example 18-6.2 Redefining an attribute group as a subset -------------------------------------------------------- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter18/example18062.xsd :language: xml :lines: 3- .. warning:: Illegal definition Example 18-7 Redefining an attribute group as a superset -------------------------------------------------------- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter18/example18071.xsd :language: xml :lines: 3- .. warning:: Illegal definition Example 18-7.2 Redefining an attribute group as a superset ---------------------------------------------------------- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter18/example18072.xsd :language: xml :lines: 3- .. warning:: Illegal definition 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.2 A simple override -------------------------------- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter18/example18082.xsd :language: xml :lines: 3- .. warning:: XML Schema 1.1 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.2 Overriding a simple type --------------------------------------- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter18/example18092.xsd :language: xml :lines: 3- .. warning:: XML Schema 1.1 .. admonition:: Samples Source :class: hint `Definitive XML Schema `_ by Priscilla Walmsley (c) 2012 Prentice Hall PTR