defxmlschema/chapter10 ====================== Example 10-1 Defining a union type ---------------------------------- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter10/example1001.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter10/example1001.py :language: python Example 10-10 Length facet applied to a list -------------------------------------------- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter10/example1010.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter10/example1010.py :language: python Example 10-13 Enumeration applied to the item type of a list ------------------------------------------------------------ .. literalinclude:: /../tests/fixtures/defxmlschema/chapter10/example1013.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter10/example1013.py :language: python Example 10-14 Enumeration correctly applied to a list type ---------------------------------------------------------- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter10/example1014.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter10/example1014.py :language: python Example 10-15 Pattern applied to a list type -------------------------------------------- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter10/example1015.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter10/example1015.py :language: python Example 10-16 Defining a list of a string-based type ---------------------------------------------------- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter10/example1016.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter10/example1016.py :language: python Example 10-18 Defining a list of a union ---------------------------------------- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter10/example1018.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter10/example1018.py :language: python Example 10-2 Using the memberTypes attribute -------------------------------------------- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter10/example1002.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter10/example1002.py :language: python Example 10-21 An array using markup ----------------------------------- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter10/example10211.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter10/example10211.py :language: python Example 10-3 Combining memberTypes and simpleType ------------------------------------------------- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter10/example1003.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter10/example1003.py :language: python Example 10-4 Restricting a union -------------------------------- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter10/example1004.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter10/example1004.py :language: python Example 10-5 A union of a union ------------------------------- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter10/example1005.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter10/example1005.py :language: python Example 10-7 Defining a list type using an itemType attribute ------------------------------------------------------------- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter10/example1007.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter10/example1007.py :language: python Example 10-9 Defining a list type using a simpleType child ---------------------------------------------------------- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter10/example1009.xsd :language: xml :lines: 3- .. literalinclude:: /../tests/fixtures/defxmlschema/chapter10/example1009.py :language: python .. admonition:: Samples Source :class: hint `Definitive XML Schema `_ by Priscilla Walmsley (c) 2012 Prentice Hall PTR