1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>pyxb package — PyXB 1.2.6 documentation</title>
<link rel="stylesheet" href="_static/classic.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '1.2.6',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="pyxb.binding package" href="pyxb.binding.html" />
<link rel="prev" title="pyxbgen Command Line Options" href="pyxbgen_cli.html" />
</head>
<body role="document">
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="pyxb.binding.html" title="pyxb.binding package"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="pyxbgen_cli.html" title="pyxbgen Command Line Options"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">PyXB 1.2.6 documentation</a> »</li>
<li style="margin-left: 20px">PyXB hosted on <a href="http://sourceforge.net/projects/pyxb"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=263147&type=9"
width="80" height="15" alt="Get PyXB: Python XML Schema Bindings at SourceForge.net. Fast, secure and Free Open Source software downloads"/></a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="module-pyxb">
<span id="pyxb-package"></span><h1>pyxb package<a class="headerlink" href="#module-pyxb" title="Permalink to this headline">¶</a></h1>
<p>PyXB stands for Python U{W3C XML
Schema<<a class="reference external" href="http://www.w3.org/XML/Schema">http://www.w3.org/XML/Schema</a>>} Bindings, and is pronounced
“pixbee”. It enables translation between XML instance documents and
Python objects following rules specified by an XML Schema document.</p>
<p>This is the top-level entrypoint to the PyXB system. Importing this
gets you all the <a class="reference internal" href="#pyxb.exceptions_.PyXBException" title="pyxb.exceptions_.PyXBException"><code class="xref py py-obj docutils literal"><span class="pre">exceptions</span></code></a>, and
<a class="reference internal" href="pyxb.namespace.html#module-pyxb.namespace" title="pyxb.namespace"><code class="xref py py-obj docutils literal"><span class="pre">pyxb.namespace</span></code></a>. For more functionality, delve into these
submodules:</p>
<blockquote>
<div><ul class="simple">
<li><a class="reference internal" href="pyxb.xmlschema.html#module-pyxb.xmlschema" title="pyxb.xmlschema"><code class="xref py py-obj docutils literal"><span class="pre">pyxb.xmlschema</span></code></a> Module holding the
<a class="reference internal" href="pyxb.xmlschema.html#module-pyxb.xmlschema.structures" title="pyxb.xmlschema.structures"><code class="xref py py-obj docutils literal"><span class="pre">structures</span></code></a> that convert XMLSchema
from a DOM model to a Python class model based on the XMLSchema
components. Use this when you need to operate on the component
model.</li>
<li><a class="reference internal" href="pyxb.binding.html#module-pyxb.binding" title="pyxb.binding"><code class="xref py py-obj docutils literal"><span class="pre">pyxb.binding</span></code></a> Module used to generate the bindings and at runtime
to support the generated bindings. Use this if you need to use the
binding model or content model.</li>
<li><a class="reference internal" href="pyxb.utils.html#module-pyxb.utils" title="pyxb.utils"><code class="xref py py-obj docutils literal"><span class="pre">pyxb.utils</span></code></a> Common utilities used in parsing, generating, and
executing. The submodules must be imported separately.</li>
</ul>
</div></blockquote>
<dl class="class">
<dt id="pyxb.BIND">
<em class="property">class </em><code class="descclassname">pyxb.</code><code class="descname">BIND</code><span class="sig-paren">(</span><em>*args</em>, <em>**kw</em><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.BIND" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">object</span></code></p>
<p>Bundle data for automated binding generation.</p>
<p>Instances of this class capture positional and keyword arguments that are
used to create binding instances based on context. For example, if <code class="xref py py-obj docutils literal"><span class="pre">w</span></code>
is an instance of a complex type whose <code class="xref py py-obj docutils literal"><span class="pre">option</span></code> element is declared to be
an anonymous class with simple content of type integer and an attribute of
<code class="xref py py-obj docutils literal"><span class="pre">units</span></code>, a correct assignment to that element could be achieved with:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">w</span><span class="o">.</span><span class="n">option</span> <span class="o">=</span> <span class="n">BIND</span><span class="p">(</span><span class="mi">54</span><span class="p">,</span> <span class="n">units</span><span class="o">=</span><span class="s2">"m"</span><span class="p">)</span>
</pre></div>
</div>
<dl class="attribute">
<dt id="pyxb.BIND._BIND__args">
<code class="descname">_BIND__args</code><em class="property"> = None</em><a class="headerlink" href="#pyxb.BIND._BIND__args" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="pyxb.BIND._BIND__kw">
<code class="descname">_BIND__kw</code><em class="property"> = None</em><a class="headerlink" href="#pyxb.BIND._BIND__kw" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="pyxb.BIND.createInstance">
<code class="descname">createInstance</code><span class="sig-paren">(</span><em>factory</em>, <em>**kw</em><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.BIND.createInstance" title="Permalink to this definition">¶</a></dt>
<dd><p>Invoke the given factory method.</p>
<p>Position arguments to the factory are those cached in this instance.
Keyword arguments are the ones on the command line, updated from the
ones in this instance.</p>
</dd></dl>
</dd></dl>
<dl class="function">
<dt id="pyxb.NonElementContent">
<code class="descclassname">pyxb.</code><code class="descname">NonElementContent</code><span class="sig-paren">(</span><em>instance</em><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.NonElementContent" title="Permalink to this definition">¶</a></dt>
<dd><p>Return an iterator producing the non-element content of the provided instance.</p>
<p>The catenated text of the non-element content of an instance can
be obtained with:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">text</span> <span class="o">=</span> <span class="n">six</span><span class="o">.</span><span class="n">u</span><span class="p">(</span><span class="s1">''</span><span class="p">)</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">pyxb</span><span class="o">.</span><span class="n">NonElementContent</span><span class="p">(</span><span class="n">instance</span><span class="p">))</span>
</pre></div>
</div>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>instance</strong> – An instance of <a class="reference internal" href="pyxb.binding.html#pyxb.binding.basis.complexTypeDefinition" title="pyxb.binding.basis.complexTypeDefinition"><code class="xref py py-obj docutils literal"><span class="pre">pyxb.binding.basis.complexTypeDefinition</span></code></a>.</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">an iterator producing text values</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="pyxb.PreserveInputTimeZone">
<code class="descclassname">pyxb.</code><code class="descname">PreserveInputTimeZone</code><span class="sig-paren">(</span><em>value=None</em><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.PreserveInputTimeZone" title="Permalink to this definition">¶</a></dt>
<dd><p>Control whether time values are converted to UTC during input.</p>
<p>The specification <<a class="reference external" href="http://www.w3.org/TR/xmlschema-2/#dateTime">http://www.w3.org/TR/xmlschema-2/#dateTime</a>> makes
clear that timezoned times are in UTC and that times in other timezones
are to be translated to UTC when converted from literal to value form.
Provide an option to bypass this step, so the input timezone is preserved.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body">Naive processing of unnormalized times–i.e., ignoring the</td>
</tr>
</tbody>
</table>
<p><code class="xref py py-obj docutils literal"><span class="pre">tzinfo</span></code> field–may result in errors.</p>
</dd></dl>
<dl class="function">
<dt id="pyxb.RequireValidWhenGenerating">
<code class="descclassname">pyxb.</code><code class="descname">RequireValidWhenGenerating</code><span class="sig-paren">(</span><em>value=None</em><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.RequireValidWhenGenerating" title="Permalink to this definition">¶</a></dt>
<dd><p>Query or set a flag that controls validation checking in XML generation.</p>
<p>Normally any attempts to convert a binding instance to a DOM or XML
representation requires that the binding validate against the content
model, since only in this way can the content be generated in the correct
order. In some cases it may be necessary or useful to generate a document
from a binding that is incomplete. If validation is not required, the
generated documents may not validate even if the content validates,
because ordering constraints will be ignored.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>value</strong> – If absent or <code class="xref py py-obj docutils literal"><span class="pre">None</span></code>, no change is made; otherwise, this</td>
</tr>
</tbody>
</table>
<p>enables (<code class="xref py py-obj docutils literal"><span class="pre">True</span></code>) or disables (<code class="xref py py-obj docutils literal"><span class="pre">False</span></code>) the requirement that instances
validate before being converted to XML.
:type value: <code class="xref py py-obj docutils literal"><span class="pre">bool</span></code></p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><code class="xref py py-obj docutils literal"><span class="pre">True</span></code> iff attempts to generate XML for a binding that does not</td>
</tr>
</tbody>
</table>
<p>validate should raise an exception.</p>
</dd></dl>
<dl class="function">
<dt id="pyxb.RequireValidWhenParsing">
<code class="descclassname">pyxb.</code><code class="descname">RequireValidWhenParsing</code><span class="sig-paren">(</span><em>value=None</em><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.RequireValidWhenParsing" title="Permalink to this definition">¶</a></dt>
<dd><p>Query or set a flag that controls validation checking in XML parsing.</p>
<p>Normally any attempts to convert XML to a binding instance to a binding
instance requires that the document validate against the content model.
In some cases it may be necessary or useful to process a document that is
incomplete. If validation is not required, the generated documents may
not validate even if the content validates, because ordering constraints
will be ignored.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>value</strong> – If absent or <code class="xref py py-obj docutils literal"><span class="pre">None</span></code>, no change is made; otherwise, this</td>
</tr>
</tbody>
</table>
<p>enables (<code class="xref py py-obj docutils literal"><span class="pre">True</span></code>) or disables (<code class="xref py py-obj docutils literal"><span class="pre">False</span></code>) the requirement that documents
validate when being converted to bindings.
:type value: <code class="xref py py-obj docutils literal"><span class="pre">bool</span></code></p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><code class="xref py py-obj docutils literal"><span class="pre">True</span></code> iff attempts to generate bindings for a document that</td>
</tr>
</tbody>
</table>
<p>does not validate should raise an exception.</p>
</dd></dl>
<dl class="class">
<dt id="pyxb.ValidationConfig">
<em class="property">class </em><code class="descclassname">pyxb.</code><code class="descname">ValidationConfig</code><a class="headerlink" href="#pyxb.ValidationConfig" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">object</span></code></p>
<p>Class holding configuration related to validation.</p>
<p><code class="xref py py-obj docutils literal"><span class="pre">pyxb.GlobalValidationConfig</span></code> is available to influence validation in all
contexts. Each binding class has a reference to an instance of this
class, which can be inspected using
<a class="reference internal" href="pyxb.binding.html#pyxb.binding.basis._TypeBinding_mixin._GetValidationConfig" title="pyxb.binding.basis._TypeBinding_mixin._GetValidationConfig"><code class="xref py py-obj docutils literal"><span class="pre">pyxb.binding.basis._TypeBinding_mixin._GetValidationConfig</span></code></a> and changed
using <a class="reference internal" href="pyxb.binding.html#pyxb.binding.basis._TypeBinding_mixin._SetValidationConfig" title="pyxb.binding.basis._TypeBinding_mixin._SetValidationConfig"><code class="xref py py-obj docutils literal"><span class="pre">pyxb.binding.basis._TypeBinding_mixin._SetValidationConfig</span></code></a>. Each
binding instance has a reference inherited from its class which can be
inspected using <a class="reference internal" href="pyxb.binding.html#pyxb.binding.basis._TypeBinding_mixin._validationConfig" title="pyxb.binding.basis._TypeBinding_mixin._validationConfig"><code class="xref py py-obj docutils literal"><span class="pre">pyxb.binding.basis._TypeBinding_mixin._validationConfig</span></code></a>
and changed using
<a class="reference internal" href="pyxb.binding.html#pyxb.binding.basis._TypeBinding_mixin._setValidationConfig" title="pyxb.binding.basis._TypeBinding_mixin._setValidationConfig"><code class="xref py py-obj docutils literal"><span class="pre">pyxb.binding.basis._TypeBinding_mixin._setValidationConfig</span></code></a>.</p>
<p>This allows fine control on a per class and per-instance basis.</p>
<p><a class="reference internal" href="#pyxb.ValidationConfig.forBinding" title="pyxb.ValidationConfig.forBinding"><code class="xref py py-obj docutils literal"><span class="pre">forBinding</span></code></a> replaces <a class="reference internal" href="#pyxb.RequireValidWhenParsing" title="pyxb.RequireValidWhenParsing"><code class="xref py py-obj docutils literal"><span class="pre">RequireValidWhenParsing</span></code></a>.</p>
<p><a class="reference internal" href="#pyxb.ValidationConfig.forDocument" title="pyxb.ValidationConfig.forDocument"><code class="xref py py-obj docutils literal"><span class="pre">forDocument</span></code></a> replaces <a class="reference internal" href="#pyxb.RequireValidWhenGenerating" title="pyxb.RequireValidWhenGenerating"><code class="xref py py-obj docutils literal"><span class="pre">RequireValidWhenGenerating</span></code></a>.</p>
<p><a class="reference internal" href="#pyxb.ValidationConfig.contentInfluencesGeneration" title="pyxb.ValidationConfig.contentInfluencesGeneration"><code class="xref py py-obj docutils literal"><span class="pre">contentInfluencesGeneration</span></code></a>, <a class="reference internal" href="#pyxb.ValidationConfig.orphanElementInContent" title="pyxb.ValidationConfig.orphanElementInContent"><code class="xref py py-obj docutils literal"><span class="pre">orphanElementInContent</span></code></a>, and
<a class="reference internal" href="#pyxb.ValidationConfig.invalidElementInContent" title="pyxb.ValidationConfig.invalidElementInContent"><code class="xref py py-obj docutils literal"><span class="pre">invalidElementInContent</span></code></a> control how
<a class="reference internal" href="pyxb.binding.html#pyxb.binding.basis.complexTypeDefinition.orderedContent" title="pyxb.binding.basis.complexTypeDefinition.orderedContent"><code class="xref py py-obj docutils literal"><span class="pre">pyxb.binding.basis.complexTypeDefinition.orderedContent</span></code></a> affects
generated documents.</p>
<dl class="attribute">
<dt id="pyxb.ValidationConfig.ALWAYS">
<code class="descname">ALWAYS</code><em class="property"> = -1</em><a class="headerlink" href="#pyxb.ValidationConfig.ALWAYS" title="Permalink to this definition">¶</a></dt>
<dd><p>Always do it.</p>
</dd></dl>
<dl class="attribute">
<dt id="pyxb.ValidationConfig.GIVE_UP">
<code class="descname">GIVE_UP</code><em class="property"> = 2</em><a class="headerlink" href="#pyxb.ValidationConfig.GIVE_UP" title="Permalink to this definition">¶</a></dt>
<dd><p>If an error occurs ignore it and stop using whatever provided the cause
of the error. (E.g., if an element in a content list fails stop
processing the content list and execute as though it was absent).</p>
</dd></dl>
<dl class="attribute">
<dt id="pyxb.ValidationConfig.IGNORE_ONCE">
<code class="descname">IGNORE_ONCE</code><em class="property"> = 1</em><a class="headerlink" href="#pyxb.ValidationConfig.IGNORE_ONCE" title="Permalink to this definition">¶</a></dt>
<dd><p>If an error occurs ignore it and continue with the next one. (E.g., if
an element in a content list fails skip it and continue with the next
element in the list.)</p>
</dd></dl>
<dl class="attribute">
<dt id="pyxb.ValidationConfig.MIXED_ONLY">
<code class="descname">MIXED_ONLY</code><em class="property"> = 4</em><a class="headerlink" href="#pyxb.ValidationConfig.MIXED_ONLY" title="Permalink to this definition">¶</a></dt>
<dd><p>Only when content type is mixed.</p>
</dd></dl>
<dl class="attribute">
<dt id="pyxb.ValidationConfig.NEVER">
<code class="descname">NEVER</code><em class="property"> = 0</em><a class="headerlink" href="#pyxb.ValidationConfig.NEVER" title="Permalink to this definition">¶</a></dt>
<dd><p>Never do it.</p>
</dd></dl>
<dl class="attribute">
<dt id="pyxb.ValidationConfig.RAISE_EXCEPTION">
<code class="descname">RAISE_EXCEPTION</code><em class="property"> = 3</em><a class="headerlink" href="#pyxb.ValidationConfig.RAISE_EXCEPTION" title="Permalink to this definition">¶</a></dt>
<dd><p>If an error occurs, raise an exception.</p>
</dd></dl>
<dl class="attribute">
<dt id="pyxb.ValidationConfig._ValidationConfig__contentInfluencesGeneration">
<code class="descname">_ValidationConfig__contentInfluencesGeneration</code><em class="property"> = 4</em><a class="headerlink" href="#pyxb.ValidationConfig._ValidationConfig__contentInfluencesGeneration" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="pyxb.ValidationConfig._ValidationConfig__forBinding">
<code class="descname">_ValidationConfig__forBinding</code><em class="property"> = True</em><a class="headerlink" href="#pyxb.ValidationConfig._ValidationConfig__forBinding" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="pyxb.ValidationConfig._ValidationConfig__forDocument">
<code class="descname">_ValidationConfig__forDocument</code><em class="property"> = True</em><a class="headerlink" href="#pyxb.ValidationConfig._ValidationConfig__forDocument" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="pyxb.ValidationConfig._ValidationConfig__getContentInfluencesGeneration">
<code class="descname">_ValidationConfig__getContentInfluencesGeneration</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.ValidationConfig._ValidationConfig__getContentInfluencesGeneration" title="Permalink to this definition">¶</a></dt>
<dd><p>Determine whether complex type content influences element order in
document generation.</p>
<p>The value is one of <a class="reference internal" href="#pyxb.ValidationConfig.ALWAYS" title="pyxb.ValidationConfig.ALWAYS"><code class="xref py py-obj docutils literal"><span class="pre">ALWAYS</span></code></a>, <a class="reference internal" href="#pyxb.ValidationConfig.NEVER" title="pyxb.ValidationConfig.NEVER"><code class="xref py py-obj docutils literal"><span class="pre">NEVER</span></code></a>, <a class="reference internal" href="#pyxb.ValidationConfig.MIXED_ONLY" title="pyxb.ValidationConfig.MIXED_ONLY"><code class="xref py py-obj docutils literal"><span class="pre">MIXED_ONLY</span></code></a> (default).</p>
</dd></dl>
<dl class="method">
<dt id="pyxb.ValidationConfig._ValidationConfig__getInvalidElementInContent">
<code class="descname">_ValidationConfig__getInvalidElementInContent</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.ValidationConfig._ValidationConfig__getInvalidElementInContent" title="Permalink to this definition">¶</a></dt>
<dd><p>How to handle invalid elements in content lists.</p>
<p>The value is one of <a class="reference internal" href="#pyxb.ValidationConfig.IGNORE_ONCE" title="pyxb.ValidationConfig.IGNORE_ONCE"><code class="xref py py-obj docutils literal"><span class="pre">IGNORE_ONCE</span></code></a> (default), <a class="reference internal" href="#pyxb.ValidationConfig.GIVE_UP" title="pyxb.ValidationConfig.GIVE_UP"><code class="xref py py-obj docutils literal"><span class="pre">GIVE_UP</span></code></a>,
<a class="reference internal" href="#pyxb.ValidationConfig.RAISE_EXCEPTION" title="pyxb.ValidationConfig.RAISE_EXCEPTION"><code class="xref py py-obj docutils literal"><span class="pre">RAISE_EXCEPTION</span></code></a>.</p>
</dd></dl>
<dl class="method">
<dt id="pyxb.ValidationConfig._ValidationConfig__getOrphanElementInContent">
<code class="descname">_ValidationConfig__getOrphanElementInContent</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.ValidationConfig._ValidationConfig__getOrphanElementInContent" title="Permalink to this definition">¶</a></dt>
<dd><p>How to handle unrecognized elements in content lists.</p>
<p>This is used when consulting a complex type instance content list to
influence the generation of documents from a binding instance.</p>
<p>The value is one of <a class="reference internal" href="#pyxb.ValidationConfig.IGNORE_ONCE" title="pyxb.ValidationConfig.IGNORE_ONCE"><code class="xref py py-obj docutils literal"><span class="pre">IGNORE_ONCE</span></code></a> (default), <a class="reference internal" href="#pyxb.ValidationConfig.GIVE_UP" title="pyxb.ValidationConfig.GIVE_UP"><code class="xref py py-obj docutils literal"><span class="pre">GIVE_UP</span></code></a>,
<a class="reference internal" href="#pyxb.ValidationConfig.RAISE_EXCEPTION" title="pyxb.ValidationConfig.RAISE_EXCEPTION"><code class="xref py py-obj docutils literal"><span class="pre">RAISE_EXCEPTION</span></code></a>.</p>
</dd></dl>
<dl class="attribute">
<dt id="pyxb.ValidationConfig._ValidationConfig__invalidElementInContent">
<code class="descname">_ValidationConfig__invalidElementInContent</code><em class="property"> = 1</em><a class="headerlink" href="#pyxb.ValidationConfig._ValidationConfig__invalidElementInContent" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="pyxb.ValidationConfig._ValidationConfig__orphanElementInContent">
<code class="descname">_ValidationConfig__orphanElementInContent</code><em class="property"> = 1</em><a class="headerlink" href="#pyxb.ValidationConfig._ValidationConfig__orphanElementInContent" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="pyxb.ValidationConfig._getForBinding">
<code class="descname">_getForBinding</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.ValidationConfig._getForBinding" title="Permalink to this definition">¶</a></dt>
<dd><p><code class="xref py py-obj docutils literal"><span class="pre">True</span></code> iff validation should be performed when manipulating a
binding instance.</p>
<p>This includes parsing a document or DOM tree, using a binding instance
class constructor, or assigning to an element or attribute field of a
binding instance.</p>
</dd></dl>
<dl class="method">
<dt id="pyxb.ValidationConfig._getForDocument">
<code class="descname">_getForDocument</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.ValidationConfig._getForDocument" title="Permalink to this definition">¶</a></dt>
<dd><p><code class="xref py py-obj docutils literal"><span class="pre">True</span></code> iff validation should be performed when creating a document
from a binding instance.</p>
<p>This applies at invocation of
<a class="reference internal" href="pyxb.binding.html#pyxb.binding.basis._TypeBinding_mixin.toDOM" title="pyxb.binding.basis._TypeBinding_mixin.toDOM"><code class="xref py py-obj docutils literal"><span class="pre">toDOM()</span></code></a>.
<a class="reference internal" href="pyxb.binding.html#pyxb.binding.basis._TypeBinding_mixin.toDOM" title="pyxb.binding.basis._TypeBinding_mixin.toDOM"><code class="xref py py-obj docutils literal"><span class="pre">toxml()</span></code></a> invokes <code class="xref py py-obj docutils literal"><span class="pre">toDOM()</span></code>.</p>
</dd></dl>
<dl class="method">
<dt id="pyxb.ValidationConfig._setContentInfluencesGeneration">
<code class="descname">_setContentInfluencesGeneration</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.ValidationConfig._setContentInfluencesGeneration" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the value of <a class="reference internal" href="#pyxb.ValidationConfig.contentInfluencesGeneration" title="pyxb.ValidationConfig.contentInfluencesGeneration"><code class="xref py py-obj docutils literal"><span class="pre">contentInfluencesGeneration</span></code></a>.</p>
</dd></dl>
<dl class="method">
<dt id="pyxb.ValidationConfig._setForBinding">
<code class="descname">_setForBinding</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.ValidationConfig._setForBinding" title="Permalink to this definition">¶</a></dt>
<dd><p>Configure whether validation should be performed when manipulating
a binding instance.</p>
</dd></dl>
<dl class="method">
<dt id="pyxb.ValidationConfig._setForDocument">
<code class="descname">_setForDocument</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.ValidationConfig._setForDocument" title="Permalink to this definition">¶</a></dt>
<dd><p>Configure whether validation should be performed when generating
a document from a binding instance.</p>
</dd></dl>
<dl class="method">
<dt id="pyxb.ValidationConfig._setInvalidElementInContent">
<code class="descname">_setInvalidElementInContent</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.ValidationConfig._setInvalidElementInContent" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the value of <a class="reference internal" href="#pyxb.ValidationConfig.invalidElementInContent" title="pyxb.ValidationConfig.invalidElementInContent"><code class="xref py py-obj docutils literal"><span class="pre">invalidElementInContent</span></code></a>.</p>
</dd></dl>
<dl class="method">
<dt id="pyxb.ValidationConfig._setOrphanElementInContent">
<code class="descname">_setOrphanElementInContent</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.ValidationConfig._setOrphanElementInContent" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the value of <a class="reference internal" href="#pyxb.ValidationConfig.orphanElementInContent" title="pyxb.ValidationConfig.orphanElementInContent"><code class="xref py py-obj docutils literal"><span class="pre">orphanElementInContent</span></code></a>.</p>
</dd></dl>
<dl class="attribute">
<dt id="pyxb.ValidationConfig.contentInfluencesGeneration">
<code class="descname">contentInfluencesGeneration</code><a class="headerlink" href="#pyxb.ValidationConfig.contentInfluencesGeneration" title="Permalink to this definition">¶</a></dt>
<dd><p>Determine whether complex type content influences element order in
document generation.</p>
<p>The value is one of <a class="reference internal" href="#pyxb.ValidationConfig.ALWAYS" title="pyxb.ValidationConfig.ALWAYS"><code class="xref py py-obj docutils literal"><span class="pre">ALWAYS</span></code></a>, <a class="reference internal" href="#pyxb.ValidationConfig.NEVER" title="pyxb.ValidationConfig.NEVER"><code class="xref py py-obj docutils literal"><span class="pre">NEVER</span></code></a>, <a class="reference internal" href="#pyxb.ValidationConfig.MIXED_ONLY" title="pyxb.ValidationConfig.MIXED_ONLY"><code class="xref py py-obj docutils literal"><span class="pre">MIXED_ONLY</span></code></a> (default).</p>
</dd></dl>
<dl class="method">
<dt id="pyxb.ValidationConfig.copy">
<code class="descname">copy</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.ValidationConfig.copy" title="Permalink to this definition">¶</a></dt>
<dd><p>Make a copy of this instance.</p>
<p>Use this to get a starting point when you need to customize validation
on a per-instance/per-class basis.</p>
</dd></dl>
<dl class="attribute">
<dt id="pyxb.ValidationConfig.forBinding">
<code class="descname">forBinding</code><a class="headerlink" href="#pyxb.ValidationConfig.forBinding" title="Permalink to this definition">¶</a></dt>
<dd><p><code class="xref py py-obj docutils literal"><span class="pre">True</span></code> iff validation should be performed when manipulating a
binding instance.</p>
<p>This includes parsing a document or DOM tree, using a binding instance
class constructor, or assigning to an element or attribute field of a
binding instance.</p>
</dd></dl>
<dl class="attribute">
<dt id="pyxb.ValidationConfig.forDocument">
<code class="descname">forDocument</code><a class="headerlink" href="#pyxb.ValidationConfig.forDocument" title="Permalink to this definition">¶</a></dt>
<dd><p><code class="xref py py-obj docutils literal"><span class="pre">True</span></code> iff validation should be performed when creating a document
from a binding instance.</p>
<p>This applies at invocation of
<a class="reference internal" href="pyxb.binding.html#pyxb.binding.basis._TypeBinding_mixin.toDOM" title="pyxb.binding.basis._TypeBinding_mixin.toDOM"><code class="xref py py-obj docutils literal"><span class="pre">toDOM()</span></code></a>.
<a class="reference internal" href="pyxb.binding.html#pyxb.binding.basis._TypeBinding_mixin.toDOM" title="pyxb.binding.basis._TypeBinding_mixin.toDOM"><code class="xref py py-obj docutils literal"><span class="pre">toxml()</span></code></a> invokes <code class="xref py py-obj docutils literal"><span class="pre">toDOM()</span></code>.</p>
</dd></dl>
<dl class="attribute">
<dt id="pyxb.ValidationConfig.invalidElementInContent">
<code class="descname">invalidElementInContent</code><a class="headerlink" href="#pyxb.ValidationConfig.invalidElementInContent" title="Permalink to this definition">¶</a></dt>
<dd><p>How to handle invalid elements in content lists.</p>
<p>The value is one of <a class="reference internal" href="#pyxb.ValidationConfig.IGNORE_ONCE" title="pyxb.ValidationConfig.IGNORE_ONCE"><code class="xref py py-obj docutils literal"><span class="pre">IGNORE_ONCE</span></code></a> (default), <a class="reference internal" href="#pyxb.ValidationConfig.GIVE_UP" title="pyxb.ValidationConfig.GIVE_UP"><code class="xref py py-obj docutils literal"><span class="pre">GIVE_UP</span></code></a>,
<a class="reference internal" href="#pyxb.ValidationConfig.RAISE_EXCEPTION" title="pyxb.ValidationConfig.RAISE_EXCEPTION"><code class="xref py py-obj docutils literal"><span class="pre">RAISE_EXCEPTION</span></code></a>.</p>
</dd></dl>
<dl class="attribute">
<dt id="pyxb.ValidationConfig.orphanElementInContent">
<code class="descname">orphanElementInContent</code><a class="headerlink" href="#pyxb.ValidationConfig.orphanElementInContent" title="Permalink to this definition">¶</a></dt>
<dd><p>How to handle unrecognized elements in content lists.</p>
<p>This is used when consulting a complex type instance content list to
influence the generation of documents from a binding instance.</p>
<p>The value is one of <a class="reference internal" href="#pyxb.ValidationConfig.IGNORE_ONCE" title="pyxb.ValidationConfig.IGNORE_ONCE"><code class="xref py py-obj docutils literal"><span class="pre">IGNORE_ONCE</span></code></a> (default), <a class="reference internal" href="#pyxb.ValidationConfig.GIVE_UP" title="pyxb.ValidationConfig.GIVE_UP"><code class="xref py py-obj docutils literal"><span class="pre">GIVE_UP</span></code></a>,
<a class="reference internal" href="#pyxb.ValidationConfig.RAISE_EXCEPTION" title="pyxb.ValidationConfig.RAISE_EXCEPTION"><code class="xref py py-obj docutils literal"><span class="pre">RAISE_EXCEPTION</span></code></a>.</p>
</dd></dl>
</dd></dl>
<dl class="data">
<dt id="pyxb.XMLStyle_minidom">
<code class="descclassname">pyxb.</code><code class="descname">XMLStyle_minidom</code><em class="property"> = 0</em><a class="headerlink" href="#pyxb.XMLStyle_minidom" title="Permalink to this definition">¶</a></dt>
<dd><p>Use xml.dom.minidom for XML processing. This is the fastest, but does not
provide location information. It produces DOM instances.</p>
</dd></dl>
<dl class="data">
<dt id="pyxb.XMLStyle_saxdom">
<code class="descclassname">pyxb.</code><code class="descname">XMLStyle_saxdom</code><em class="property"> = 1</em><a class="headerlink" href="#pyxb.XMLStyle_saxdom" title="Permalink to this definition">¶</a></dt>
<dd><p>Use pyxb.utils.saxdom for XML processing. This is the slowest, but both
provides location information and generates a DOM instance.</p>
</dd></dl>
<dl class="data">
<dt id="pyxb.XMLStyle_saxer">
<code class="descclassname">pyxb.</code><code class="descname">XMLStyle_saxer</code><em class="property"> = 2</em><a class="headerlink" href="#pyxb.XMLStyle_saxer" title="Permalink to this definition">¶</a></dt>
<dd><p>Use pyxb.binding.saxer when converting documents to binding instances.
This style supports location information in the bindings. It produces binding
instances directly, without going through a DOM stage, so is faster than
XMLStyle_saxdom. However, since the pyxb.xmlschema.structures classes require
a DOM model, XMLStyle_saxdom will be used for pyxb.utils.domutils.StringToDOM
if this style is selected.</p>
</dd></dl>
<dl class="function">
<dt id="pyxb._SetXMLStyle">
<code class="descclassname">pyxb.</code><code class="descname">_SetXMLStyle</code><span class="sig-paren">(</span><em>style=None</em><span class="sig-paren">)</span><a class="headerlink" href="#pyxb._SetXMLStyle" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the interface used to parse XML content.</p>
<p>This can be invoked within code. The system default of <a class="reference internal" href="#pyxb.XMLStyle_saxer" title="pyxb.XMLStyle_saxer"><code class="xref py py-obj docutils literal"><span class="pre">XMLStyle_saxer</span></code></a>
can also be overridden at runtime by setting the environment variable
<code class="xref py py-obj docutils literal"><span class="pre">PYXB_XML_STYLE</span></code> to one of <code class="xref py py-obj docutils literal"><span class="pre">minidom</span></code>, <code class="xref py py-obj docutils literal"><span class="pre">saxdom</span></code>, or <code class="xref py py-obj docutils literal"><span class="pre">saxer</span></code>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>style</strong> – One of <a class="reference internal" href="#pyxb.XMLStyle_minidom" title="pyxb.XMLStyle_minidom"><code class="xref py py-obj docutils literal"><span class="pre">XMLStyle_minidom</span></code></a>, <a class="reference internal" href="#pyxb.XMLStyle_saxdom" title="pyxb.XMLStyle_saxdom"><code class="xref py py-obj docutils literal"><span class="pre">XMLStyle_saxdom</span></code></a>,</td>
</tr>
</tbody>
</table>
<p><a class="reference internal" href="#pyxb.XMLStyle_saxer" title="pyxb.XMLStyle_saxer"><code class="xref py py-obj docutils literal"><span class="pre">XMLStyle_saxer</span></code></a>. If not provided, the system default is used.</p>
</dd></dl>
<dl class="class">
<dt id="pyxb.cscRoot">
<em class="property">class </em><code class="descclassname">pyxb.</code><code class="descname">cscRoot</code><span class="sig-paren">(</span><em>*args</em>, <em>**kw</em><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.cscRoot" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">object</span></code></p>
<p>This little bundle of joy exists because in Python 2.6 it
became an error to invoke <code class="xref py py-obj docutils literal"><span class="pre">object.__init__</span></code> with parameters (unless
you also override <code class="xref py py-obj docutils literal"><span class="pre">__new__</span></code>, in which case it’s only a warning.
Whatever.). Since I’m bloody not going to check in every class
whether <code class="xref py py-obj docutils literal"><span class="pre">super(Myclass,self)</span></code> refers to <code class="xref py py-obj docutils literal"><span class="pre">object</span></code> (even if I could
figure out how to do that, ‘cuz the obvious solutions don’t work),
we’ll just make this thing the root of all U{cooperative super
calling<<a class="reference external" href="http://www.geocities.com/foetsch/python/new_style_classes.htm#super">http://www.geocities.com/foetsch/python/new_style_classes.htm#super</a>>}
hierarchies. The standard syntax in PyXB for this pattern is:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="k">def</span> <span class="nf">method_csc</span> <span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kw</span><span class="p">):</span>
<span class="n">self_fn</span> <span class="o">=</span> <span class="k">lambda</span> <span class="o">*</span><span class="n">_args</span><span class="p">,</span> <span class="o">**</span><span class="n">_kw</span><span class="p">:</span> <span class="bp">self</span>
<span class="n">super_fn</span> <span class="o">=</span> <span class="nb">getattr</span><span class="p">(</span><span class="nb">super</span><span class="p">(</span><span class="n">ThisClass</span><span class="p">,</span> <span class="bp">self</span><span class="p">),</span> <span class="s1">'method_csc'</span><span class="p">,</span> <span class="n">self_fn</span><span class="p">)</span>
<span class="k">return</span> <span class="n">super_fn</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kw</span><span class="p">)</span>
</pre></div>
</div>
</dd></dl>
<div class="section" id="subpackages">
<h2>subpackages<a class="headerlink" href="#subpackages" title="Permalink to this headline">¶</a></h2>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="pyxb.binding.html">pyxb.binding package</a><ul>
<li class="toctree-l2"><a class="reference internal" href="pyxb.binding.html#submodules">Submodules</a></li>
<li class="toctree-l2"><a class="reference internal" href="pyxb.binding.html#module-pyxb.binding.basis">pyxb.binding.basis module</a></li>
<li class="toctree-l2"><a class="reference internal" href="pyxb.binding.html#pyxb-binding-content-module">pyxb.binding.content module</a></li>
<li class="toctree-l2"><a class="reference internal" href="pyxb.binding.html#module-pyxb.binding.datatypes">pyxb.binding.datatypes module</a></li>
<li class="toctree-l2"><a class="reference internal" href="pyxb.binding.html#module-pyxb.binding.facets">pyxb.binding.facets module</a></li>
<li class="toctree-l2"><a class="reference internal" href="pyxb.binding.html#module-pyxb.binding.generate">pyxb.binding.generate module</a></li>
<li class="toctree-l2"><a class="reference internal" href="pyxb.binding.html#module-pyxb.binding.saxer">pyxb.binding.saxer module</a></li>
<li class="toctree-l2"><a class="reference internal" href="pyxb.binding.html#module-pyxb.binding.xml_">pyxb.binding.xml_ module</a></li>
<li class="toctree-l2"><a class="reference internal" href="pyxb.binding.html#module-pyxb.binding">Module contents</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="pyxb.namespace.html">pyxb.namespace package</a><ul>
<li class="toctree-l2"><a class="reference internal" href="pyxb.namespace.html#submodules">Submodules</a></li>
<li class="toctree-l2"><a class="reference internal" href="pyxb.namespace.html#pyxb-namespace-archive-module">pyxb.namespace.archive module</a></li>
<li class="toctree-l2"><a class="reference internal" href="pyxb.namespace.html#module-pyxb.namespace.builtin">pyxb.namespace.builtin module</a></li>
<li class="toctree-l2"><a class="reference internal" href="pyxb.namespace.html#pyxb-namespace-resolution-module">pyxb.namespace.resolution module</a></li>
<li class="toctree-l2"><a class="reference internal" href="pyxb.namespace.html#module-pyxb.namespace.utility">pyxb.namespace.utility module</a></li>
<li class="toctree-l2"><a class="reference internal" href="pyxb.namespace.html#module-pyxb.namespace">Module contents</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="pyxb.utils.html">pyxb.utils package</a><ul>
<li class="toctree-l2"><a class="reference internal" href="pyxb.utils.html#submodules">Submodules</a></li>
<li class="toctree-l2"><a class="reference internal" href="pyxb.utils.html#module-pyxb.utils.activestate">pyxb.utils.activestate module</a></li>
<li class="toctree-l2"><a class="reference internal" href="pyxb.utils.html#module-pyxb.utils.domutils">pyxb.utils.domutils module</a></li>
<li class="toctree-l2"><a class="reference internal" href="pyxb.utils.html#pyxb-utils-fac-module">pyxb.utils.fac module</a></li>
<li class="toctree-l2"><a class="reference internal" href="pyxb.utils.html#module-pyxb.utils.saxdom">pyxb.utils.saxdom module</a></li>
<li class="toctree-l2"><a class="reference internal" href="pyxb.utils.html#module-pyxb.utils.saxutils">pyxb.utils.saxutils module</a></li>
<li class="toctree-l2"><a class="reference internal" href="pyxb.utils.html#module-pyxb.utils.six">pyxb.utils.six module</a></li>
<li class="toctree-l2"><a class="reference internal" href="pyxb.utils.html#module-pyxb.utils.templates">pyxb.utils.templates module</a></li>
<li class="toctree-l2"><a class="reference internal" href="pyxb.utils.html#module-pyxb.utils.unicode">pyxb.utils.unicode module</a></li>
<li class="toctree-l2"><a class="reference internal" href="pyxb.utils.html#module-pyxb.utils.unicode_data">pyxb.utils.unicode_data module</a></li>
<li class="toctree-l2"><a class="reference internal" href="pyxb.utils.html#module-pyxb.utils.utility">pyxb.utils.utility module</a></li>
<li class="toctree-l2"><a class="reference internal" href="pyxb.utils.html#module-pyxb.utils.xmlre">pyxb.utils.xmlre module</a></li>
<li class="toctree-l2"><a class="reference internal" href="pyxb.utils.html#module-pyxb.utils">Module contents</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="pyxb.xmlschema.html">pyxb.xmlschema package</a><ul>
<li class="toctree-l2"><a class="reference internal" href="pyxb.xmlschema.html#submodules">Submodules</a></li>
<li class="toctree-l2"><a class="reference internal" href="pyxb.xmlschema.html#module-pyxb.xmlschema.structures">pyxb.xmlschema.structures module</a></li>
<li class="toctree-l2"><a class="reference internal" href="pyxb.xmlschema.html#module-pyxb.xmlschema">Module contents</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div class="section" id="submodules">
<h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this headline">¶</a></h2>
</div>
<div class="section" id="module-pyxb.exceptions_">
<span id="pyxb-exceptions-module"></span><h2>pyxb.exceptions_ module<a class="headerlink" href="#module-pyxb.exceptions_" title="Permalink to this headline">¶</a></h2>
<p>Extensions of standard exceptions for PyXB events.</p>
<p>Yeah, I’d love this module to be named exceptions.py, but it can’t
because the standard library has one of those, and we need to
reference it below.</p>
<dl class="exception">
<dt id="pyxb.exceptions_.AbstractElementError">
<em class="property">exception </em><code class="descclassname">pyxb.exceptions_.</code><code class="descname">AbstractElementError</code><span class="sig-paren">(</span><em>element</em>, <em>location</em>, <em>value=None</em><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.exceptions_.AbstractElementError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pyxb.exceptions_.ElementValidationError" title="pyxb.exceptions_.ElementValidationError"><code class="xref py py-class docutils literal"><span class="pre">pyxb.exceptions_.ElementValidationError</span></code></a></p>
<p>Attempt to create an instance of an abstract element.</p>
<p>Raised when an element is created and the identified binding is
abstract. Such elements cannot be created directly; instead the
creation must derive from an instance of the abstract element’s
substitution group.</p>
<p>Since members of the substitution group self-identify using the
<code class="xref py py-obj docutils literal"><span class="pre">substitutionGroup</span></code> attribute, there is no general way to find
the set of elements which would be acceptable in place of the
abstract element.</p>
<dl class="attribute">
<dt id="pyxb.exceptions_.AbstractElementError.element">
<code class="descname">element</code><em class="property"> = None</em><a class="headerlink" href="#pyxb.exceptions_.AbstractElementError.element" title="Permalink to this definition">¶</a></dt>
<dd><p>The abstract <a class="reference internal" href="pyxb.binding.html#pyxb.binding.basis.element" title="pyxb.binding.basis.element"><code class="xref py py-obj docutils literal"><span class="pre">pyxb.binding.basis.element</span></code></a> in question</p>
</dd></dl>
<dl class="attribute">
<dt id="pyxb.exceptions_.AbstractElementError.value">
<code class="descname">value</code><em class="property"> = None</em><a class="headerlink" href="#pyxb.exceptions_.AbstractElementError.value" title="Permalink to this definition">¶</a></dt>
<dd><p>The value proposed for the <a class="reference internal" href="#pyxb.exceptions_.AbstractElementError.element" title="pyxb.exceptions_.AbstractElementError.element"><code class="xref py py-obj docutils literal"><span class="pre">element</span></code></a>. This is usually going
to be a <code class="xref py py-obj docutils literal"><span class="pre">xml.dom.Node</span></code> used in the attempt to create the element,
<code class="xref py py-obj docutils literal"><span class="pre">None</span></code> if the abstract element was invoked without a node, or
another type if
<a class="reference internal" href="pyxb.binding.html#pyxb.binding.content.ElementDeclaration.toDOM" title="pyxb.binding.content.ElementDeclaration.toDOM"><code class="xref py py-obj docutils literal"><span class="pre">pyxb.binding.content.ElementDeclaration.toDOM</span></code></a> is
mis-used.</p>
</dd></dl>
</dd></dl>
<dl class="exception">
<dt id="pyxb.exceptions_.AbstractInstantiationError">
<em class="property">exception </em><code class="descclassname">pyxb.exceptions_.</code><code class="descname">AbstractInstantiationError</code><span class="sig-paren">(</span><em>type</em>, <em>location</em>, <em>node</em><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.exceptions_.AbstractInstantiationError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pyxb.exceptions_.ComplexTypeValidationError" title="pyxb.exceptions_.ComplexTypeValidationError"><code class="xref py py-class docutils literal"><span class="pre">pyxb.exceptions_.ComplexTypeValidationError</span></code></a></p>
<p>Attempt to create an instance of an abstract complex type.</p>
<p>These types are analogous to abstract base classes, and cannot be
created directly. A type should be used that extends the abstract
class.</p>
<p>When an incoming document is missing the xsi:type attribute which
redirects an element with an abstract type to the correct type,
the <a class="reference internal" href="#pyxb.exceptions_.AbstractInstantiationError.node" title="pyxb.exceptions_.AbstractInstantiationError.node"><code class="xref py py-obj docutils literal"><span class="pre">node</span></code></a> attribute is provided so the user can get a clue as to
where the problem occured. When this exception is a result of
constructor mis-use in Python code, the traceback will tell you
where the problem lies.</p>
<dl class="attribute">
<dt id="pyxb.exceptions_.AbstractInstantiationError.node">
<code class="descname">node</code><em class="property"> = None</em><a class="headerlink" href="#pyxb.exceptions_.AbstractInstantiationError.node" title="Permalink to this definition">¶</a></dt>
<dd><p>The <code class="xref py py-obj docutils literal"><span class="pre">xml.dom.Element</span></code> from which instantiation was attempted, if available.</p>
</dd></dl>
<dl class="attribute">
<dt id="pyxb.exceptions_.AbstractInstantiationError.type">
<code class="descname">type</code><em class="property"> = None</em><a class="headerlink" href="#pyxb.exceptions_.AbstractInstantiationError.type" title="Permalink to this definition">¶</a></dt>
<dd><p>The abstract <a class="reference internal" href="pyxb.binding.html#pyxb.binding.basis.complexTypeDefinition" title="pyxb.binding.basis.complexTypeDefinition"><code class="xref py py-obj docutils literal"><span class="pre">pyxb.binding.basis.complexTypeDefinition</span></code></a> subclass used.</p>
</dd></dl>
</dd></dl>
<dl class="exception">
<dt id="pyxb.exceptions_.AttributeChangeError">
<em class="property">exception </em><code class="descclassname">pyxb.exceptions_.</code><code class="descname">AttributeChangeError</code><span class="sig-paren">(</span><em>type</em>, <em>tag</em>, <em>instance=None</em>, <em>location=None</em><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.exceptions_.AttributeChangeError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pyxb.exceptions_.AttributeValidationError" title="pyxb.exceptions_.AttributeValidationError"><code class="xref py py-class docutils literal"><span class="pre">pyxb.exceptions_.AttributeValidationError</span></code></a></p>
<p>Attempt to change an attribute that has a fixed value constraint.</p>
</dd></dl>
<dl class="exception">
<dt id="pyxb.exceptions_.AttributeOnSimpleTypeError">
<em class="property">exception </em><code class="descclassname">pyxb.exceptions_.</code><code class="descname">AttributeOnSimpleTypeError</code><span class="sig-paren">(</span><em>instance</em>, <em>tag</em>, <em>value</em>, <em>location=None</em><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.exceptions_.AttributeOnSimpleTypeError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pyxb.exceptions_.ComplexTypeValidationError" title="pyxb.exceptions_.ComplexTypeValidationError"><code class="xref py py-class docutils literal"><span class="pre">pyxb.exceptions_.ComplexTypeValidationError</span></code></a></p>
<p>Attempt made to set an attribute on an element with simple type.</p>
<p>Note that elements with complex type and simple content may have
attributes; elements with simple type must not.</p>
<dl class="attribute">
<dt id="pyxb.exceptions_.AttributeOnSimpleTypeError.instance">
<code class="descname">instance</code><em class="property"> = None</em><a class="headerlink" href="#pyxb.exceptions_.AttributeOnSimpleTypeError.instance" title="Permalink to this definition">¶</a></dt>
<dd><p>The simple type binding instance on which no attributes exist.</p>
</dd></dl>
<dl class="attribute">
<dt id="pyxb.exceptions_.AttributeOnSimpleTypeError.tag">
<code class="descname">tag</code><em class="property"> = None</em><a class="headerlink" href="#pyxb.exceptions_.AttributeOnSimpleTypeError.tag" title="Permalink to this definition">¶</a></dt>
<dd><p>The name of the proposed attribute.</p>
</dd></dl>
<dl class="attribute">
<dt id="pyxb.exceptions_.AttributeOnSimpleTypeError.value">
<code class="descname">value</code><em class="property"> = None</em><a class="headerlink" href="#pyxb.exceptions_.AttributeOnSimpleTypeError.value" title="Permalink to this definition">¶</a></dt>
<dd><p>The value proposed to be assigned to the non-existent attribute.</p>
</dd></dl>
</dd></dl>
<dl class="exception">
<dt id="pyxb.exceptions_.AttributeValidationError">
<em class="property">exception </em><code class="descclassname">pyxb.exceptions_.</code><code class="descname">AttributeValidationError</code><span class="sig-paren">(</span><em>type</em>, <em>tag</em>, <em>instance=None</em>, <em>location=None</em><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.exceptions_.AttributeValidationError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pyxb.exceptions_.ValidationError" title="pyxb.exceptions_.ValidationError"><code class="xref py py-class docutils literal"><span class="pre">pyxb.exceptions_.ValidationError</span></code></a></p>
<p>Raised when an attribute requirement is not satisfied.</p>
<dl class="attribute">
<dt id="pyxb.exceptions_.AttributeValidationError.instance">
<code class="descname">instance</code><em class="property"> = None</em><a class="headerlink" href="#pyxb.exceptions_.AttributeValidationError.instance" title="Permalink to this definition">¶</a></dt>
<dd><p>The binding instance, if available.</p>
</dd></dl>
<dl class="attribute">
<dt id="pyxb.exceptions_.AttributeValidationError.tag">
<code class="descname">tag</code><em class="property"> = None</em><a class="headerlink" href="#pyxb.exceptions_.AttributeValidationError.tag" title="Permalink to this definition">¶</a></dt>
<dd><p>The name of the attribute.</p>
</dd></dl>
<dl class="attribute">
<dt id="pyxb.exceptions_.AttributeValidationError.type">
<code class="descname">type</code><em class="property"> = None</em><a class="headerlink" href="#pyxb.exceptions_.AttributeValidationError.type" title="Permalink to this definition">¶</a></dt>
<dd><p>The <a class="reference internal" href="pyxb.binding.html#pyxb.binding.basis.complexTypeDefinition" title="pyxb.binding.basis.complexTypeDefinition"><code class="xref py py-obj docutils literal"><span class="pre">pyxb.binding.basis.complexTypeDefinition</span></code></a> subclass of the instance.</p>
</dd></dl>
</dd></dl>
<dl class="exception">
<dt id="pyxb.exceptions_.BadDocumentError">
<em class="property">exception </em><code class="descclassname">pyxb.exceptions_.</code><code class="descname">BadDocumentError</code><span class="sig-paren">(</span><em>*args</em>, <em>**kw</em><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.exceptions_.BadDocumentError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pyxb.exceptions_.PyXBException" title="pyxb.exceptions_.PyXBException"><code class="xref py py-class docutils literal"><span class="pre">pyxb.exceptions_.PyXBException</span></code></a></p>
<p>Raised when processing document content and an error is encountered.</p>
</dd></dl>
<dl class="exception">
<dt id="pyxb.exceptions_.BatchElementContentError">
<em class="property">exception </em><code class="descclassname">pyxb.exceptions_.</code><code class="descname">BatchElementContentError</code><span class="sig-paren">(</span><em>instance</em>, <em>fac_configuration</em>, <em>symbols</em>, <em>symbol_set</em><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.exceptions_.BatchElementContentError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pyxb.exceptions_.ContentValidationError" title="pyxb.exceptions_.ContentValidationError"><code class="xref py py-class docutils literal"><span class="pre">pyxb.exceptions_.ContentValidationError</span></code></a></p>
<p>Element/wildcard content cannot be reconciled with the required content model.</p>
<p>This exception occurs in post-construction validation using a
fresh validating automaton.</p>
<dl class="method">
<dt id="pyxb.exceptions_.BatchElementContentError.details">
<code class="descname">details</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.exceptions_.BatchElementContentError.details" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="pyxb.exceptions_.BatchElementContentError.fac_configuration">
<code class="descname">fac_configuration</code><em class="property"> = None</em><a class="headerlink" href="#pyxb.exceptions_.BatchElementContentError.fac_configuration" title="Permalink to this definition">¶</a></dt>
<dd><p>The <a class="reference internal" href="pyxb.utils.html#pyxb.utils.fac.Configuration" title="pyxb.utils.fac.Configuration"><code class="xref py py-obj docutils literal"><span class="pre">pyxb.utils.fac.Configuration</span></code></a> representing the current state of the <a class="reference internal" href="#pyxb.exceptions_.BatchElementContentError.instance" title="pyxb.exceptions_.BatchElementContentError.instance"><code class="xref py py-obj docutils literal"><span class="pre">instance</span></code></a> automaton.</p>
</dd></dl>
<dl class="attribute">
<dt id="pyxb.exceptions_.BatchElementContentError.instance">
<code class="descname">instance</code><em class="property"> = None</em><a class="headerlink" href="#pyxb.exceptions_.BatchElementContentError.instance" title="Permalink to this definition">¶</a></dt>
<dd><p>The binding instance being constructed.</p>
</dd></dl>
<dl class="attribute">
<dt id="pyxb.exceptions_.BatchElementContentError.symbol_set">
<code class="descname">symbol_set</code><em class="property"> = None</em><a class="headerlink" href="#pyxb.exceptions_.BatchElementContentError.symbol_set" title="Permalink to this definition">¶</a></dt>
<dd><p>The leftovers from <a class="reference internal" href="pyxb.binding.html#pyxb.binding.basis.complexTypeDefinition._symbolSet" title="pyxb.binding.basis.complexTypeDefinition._symbolSet"><code class="xref py py-obj docutils literal"><span class="pre">pyxb.binding.basis.complexTypeDefinition._symbolSet</span></code></a> that could not be reconciled with the content model.</p>
</dd></dl>
<dl class="attribute">
<dt id="pyxb.exceptions_.BatchElementContentError.symbols">
<code class="descname">symbols</code><em class="property"> = None</em><a class="headerlink" href="#pyxb.exceptions_.BatchElementContentError.symbols" title="Permalink to this definition">¶</a></dt>
<dd><p>The sequence of symbols that were accepted as content prior to the error.</p>
</dd></dl>
</dd></dl>
<dl class="exception">
<dt id="pyxb.exceptions_.BindingError">
<em class="property">exception </em><code class="descclassname">pyxb.exceptions_.</code><code class="descname">BindingError</code><span class="sig-paren">(</span><em>*args</em>, <em>**kw</em><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.exceptions_.BindingError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pyxb.exceptions_.PyXBException" title="pyxb.exceptions_.PyXBException"><code class="xref py py-class docutils literal"><span class="pre">pyxb.exceptions_.PyXBException</span></code></a></p>
<p>Raised when the bindings are mis-used.</p>
<p>These are not validation errors, but rather structural errors.
For example, attempts to extract complex content from a type that
requires simple content, or vice versa.</p>
</dd></dl>
<dl class="exception">
<dt id="pyxb.exceptions_.BindingGenerationError">
<em class="property">exception </em><code class="descclassname">pyxb.exceptions_.</code><code class="descname">BindingGenerationError</code><span class="sig-paren">(</span><em>*args</em>, <em>**kw</em><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.exceptions_.BindingGenerationError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pyxb.exceptions_.PyXBException" title="pyxb.exceptions_.PyXBException"><code class="xref py py-class docutils literal"><span class="pre">pyxb.exceptions_.PyXBException</span></code></a></p>
<p>Raised when something goes wrong generating the binding classes</p>
</dd></dl>
<dl class="exception">
<dt id="pyxb.exceptions_.ComplexTypeValidationError">
<em class="property">exception </em><code class="descclassname">pyxb.exceptions_.</code><code class="descname">ComplexTypeValidationError</code><span class="sig-paren">(</span><em>*args</em>, <em>**kw</em><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.exceptions_.ComplexTypeValidationError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pyxb.exceptions_.ValidationError" title="pyxb.exceptions_.ValidationError"><code class="xref py py-class docutils literal"><span class="pre">pyxb.exceptions_.ValidationError</span></code></a></p>
<p>Raised when a validation requirement for a complex type is not satisfied.</p>
</dd></dl>
<dl class="exception">
<dt id="pyxb.exceptions_.ContentInNilInstanceError">
<em class="property">exception </em><code class="descclassname">pyxb.exceptions_.</code><code class="descname">ContentInNilInstanceError</code><span class="sig-paren">(</span><em>instance</em>, <em>content</em>, <em>location=None</em><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.exceptions_.ContentInNilInstanceError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pyxb.exceptions_.ElementValidationError" title="pyxb.exceptions_.ElementValidationError"><code class="xref py py-class docutils literal"><span class="pre">pyxb.exceptions_.ElementValidationError</span></code></a></p>
<p>Raised when an element that is marked to be nil is assigned content.</p>
<dl class="attribute">
<dt id="pyxb.exceptions_.ContentInNilInstanceError.content">
<code class="descname">content</code><em class="property"> = None</em><a class="headerlink" href="#pyxb.exceptions_.ContentInNilInstanceError.content" title="Permalink to this definition">¶</a></dt>
<dd><p>The content that was to be assigned to the instance.</p>
</dd></dl>
<dl class="attribute">
<dt id="pyxb.exceptions_.ContentInNilInstanceError.instance">
<code class="descname">instance</code><em class="property"> = None</em><a class="headerlink" href="#pyxb.exceptions_.ContentInNilInstanceError.instance" title="Permalink to this definition">¶</a></dt>
<dd><p>The binding instance which is xsi:nil</p>
</dd></dl>
</dd></dl>
<dl class="exception">
<dt id="pyxb.exceptions_.ContentNondeterminismExceededError">
<em class="property">exception </em><code class="descclassname">pyxb.exceptions_.</code><code class="descname">ContentNondeterminismExceededError</code><span class="sig-paren">(</span><em>instance</em><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.exceptions_.ContentNondeterminismExceededError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pyxb.exceptions_.ContentValidationError" title="pyxb.exceptions_.ContentValidationError"><code class="xref py py-class docutils literal"><span class="pre">pyxb.exceptions_.ContentValidationError</span></code></a></p>
<p>Content validation exceeded the allowed limits of nondeterminism.</p>
<dl class="attribute">
<dt id="pyxb.exceptions_.ContentNondeterminismExceededError.instance">
<code class="descname">instance</code><em class="property"> = None</em><a class="headerlink" href="#pyxb.exceptions_.ContentNondeterminismExceededError.instance" title="Permalink to this definition">¶</a></dt>
<dd><p>The binding instance being validated.</p>
</dd></dl>
</dd></dl>
<dl class="exception">
<dt id="pyxb.exceptions_.ContentValidationError">
<em class="property">exception </em><code class="descclassname">pyxb.exceptions_.</code><code class="descname">ContentValidationError</code><span class="sig-paren">(</span><em>*args</em>, <em>**kw</em><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.exceptions_.ContentValidationError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pyxb.exceptions_.ComplexTypeValidationError" title="pyxb.exceptions_.ComplexTypeValidationError"><code class="xref py py-class docutils literal"><span class="pre">pyxb.exceptions_.ComplexTypeValidationError</span></code></a></p>
<p>Violation of a complex type content model.</p>
</dd></dl>
<dl class="exception">
<dt id="pyxb.exceptions_.DOMGenerationError">
<em class="property">exception </em><code class="descclassname">pyxb.exceptions_.</code><code class="descname">DOMGenerationError</code><span class="sig-paren">(</span><em>*args</em>, <em>**kw</em><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.exceptions_.DOMGenerationError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pyxb.exceptions_.PyXBException" title="pyxb.exceptions_.PyXBException"><code class="xref py py-class docutils literal"><span class="pre">pyxb.exceptions_.PyXBException</span></code></a></p>
<p>A non-validation error encountered converting bindings to DOM.</p>
</dd></dl>
<dl class="exception">
<dt id="pyxb.exceptions_.ElementChangeError">
<em class="property">exception </em><code class="descclassname">pyxb.exceptions_.</code><code class="descname">ElementChangeError</code><span class="sig-paren">(</span><em>element</em>, <em>value</em>, <em>location=None</em><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.exceptions_.ElementChangeError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pyxb.exceptions_.ElementValidationError" title="pyxb.exceptions_.ElementValidationError"><code class="xref py py-class docutils literal"><span class="pre">pyxb.exceptions_.ElementValidationError</span></code></a></p>
<p>Attempt to change an element that has a fixed value constraint.</p>
<dl class="attribute">
<dt id="pyxb.exceptions_.ElementChangeError.element">
<code class="descname">element</code><em class="property"> = None</em><a class="headerlink" href="#pyxb.exceptions_.ElementChangeError.element" title="Permalink to this definition">¶</a></dt>
<dd><p>The <a class="reference internal" href="pyxb.binding.html#pyxb.binding.basis.element" title="pyxb.binding.basis.element"><code class="xref py py-obj docutils literal"><span class="pre">pyxb.binding.basis.element</span></code></a> that has a fixed value.</p>
</dd></dl>
<dl class="attribute">
<dt id="pyxb.exceptions_.ElementChangeError.value">
<code class="descname">value</code><em class="property"> = None</em><a class="headerlink" href="#pyxb.exceptions_.ElementChangeError.value" title="Permalink to this definition">¶</a></dt>
<dd><p>The value that was to be assigned to the element.</p>
</dd></dl>
</dd></dl>
<dl class="exception">
<dt id="pyxb.exceptions_.ElementValidationError">
<em class="property">exception </em><code class="descclassname">pyxb.exceptions_.</code><code class="descname">ElementValidationError</code><span class="sig-paren">(</span><em>*args</em>, <em>**kw</em><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.exceptions_.ElementValidationError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pyxb.exceptions_.ValidationError" title="pyxb.exceptions_.ValidationError"><code class="xref py py-class docutils literal"><span class="pre">pyxb.exceptions_.ValidationError</span></code></a></p>
<p>Raised when a validation requirement for an element is not satisfied.</p>
</dd></dl>
<dl class="exception">
<dt id="pyxb.exceptions_.ExtraSimpleContentError">
<em class="property">exception </em><code class="descclassname">pyxb.exceptions_.</code><code class="descname">ExtraSimpleContentError</code><span class="sig-paren">(</span><em>instance</em>, <em>value</em>, <em>location=None</em><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.exceptions_.ExtraSimpleContentError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pyxb.exceptions_.ContentValidationError" title="pyxb.exceptions_.ContentValidationError"><code class="xref py py-class docutils literal"><span class="pre">pyxb.exceptions_.ContentValidationError</span></code></a></p>
<p>A complex type with simple content was provided too much content.</p>
<dl class="attribute">
<dt id="pyxb.exceptions_.ExtraSimpleContentError.instance">
<code class="descname">instance</code><em class="property"> = None</em><a class="headerlink" href="#pyxb.exceptions_.ExtraSimpleContentError.instance" title="Permalink to this definition">¶</a></dt>
<dd><p>The binding instance that already has simple content assigned.</p>
</dd></dl>
<dl class="attribute">
<dt id="pyxb.exceptions_.ExtraSimpleContentError.value">
<code class="descname">value</code><em class="property"> = None</em><a class="headerlink" href="#pyxb.exceptions_.ExtraSimpleContentError.value" title="Permalink to this definition">¶</a></dt>
<dd><p>The proposed addition to that simple content.</p>
</dd></dl>
</dd></dl>
<dl class="exception">
<dt id="pyxb.exceptions_.IncompleteElementContentError">
<em class="property">exception </em><code class="descclassname">pyxb.exceptions_.</code><code class="descname">IncompleteElementContentError</code><span class="sig-paren">(</span><em>instance</em>, <em>fac_configuration</em>, <em>symbols</em>, <em>symbol_set</em><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.exceptions_.IncompleteElementContentError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pyxb.exceptions_.BatchElementContentError" title="pyxb.exceptions_.BatchElementContentError"><code class="xref py py-class docutils literal"><span class="pre">pyxb.exceptions_.BatchElementContentError</span></code></a></p>
<p>Validation of an instance failed to produce an accepting state.</p>
<p>This exception occurs in batch-mode validation.</p>
</dd></dl>
<dl class="exception">
<dt id="pyxb.exceptions_.IncompleteImplementationError">
<em class="property">exception </em><code class="descclassname">pyxb.exceptions_.</code><code class="descname">IncompleteImplementationError</code><a class="headerlink" href="#pyxb.exceptions_.IncompleteImplementationError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pyxb.exceptions_.LogicError" title="pyxb.exceptions_.LogicError"><code class="xref py py-class docutils literal"><span class="pre">pyxb.exceptions_.LogicError</span></code></a></p>
<p>Raised when required capability has not been implemented.</p>
<p>This is only used where it is reasonable to expect the capability
to be present, such as a feature of XML schema that is not
supported (e.g., the redefine directive).</p>
</dd></dl>
<dl class="exception">
<dt id="pyxb.exceptions_.IncrementalElementContentError">
<em class="property">exception </em><code class="descclassname">pyxb.exceptions_.</code><code class="descname">IncrementalElementContentError</code><span class="sig-paren">(</span><em>instance</em>, <em>automaton_configuration</em>, <em>value</em>, <em>location=None</em><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.exceptions_.IncrementalElementContentError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pyxb.exceptions_.ContentValidationError" title="pyxb.exceptions_.ContentValidationError"><code class="xref py py-class docutils literal"><span class="pre">pyxb.exceptions_.ContentValidationError</span></code></a></p>
<p>Element or element-like content could not be validly associated with an sub-element in the content model.</p>
<p>This exception occurs when content is added to an element during
incremental validation, such as when positional arguments are used
in a constructor or material is appended either explicitly or
through parsing a DOM instance.</p>
<dl class="method">
<dt id="pyxb.exceptions_.IncrementalElementContentError._valueDescription">
<code class="descname">_valueDescription</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.exceptions_.IncrementalElementContentError._valueDescription" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="pyxb.exceptions_.IncrementalElementContentError.automaton_configuration">
<code class="descname">automaton_configuration</code><em class="property"> = None</em><a class="headerlink" href="#pyxb.exceptions_.IncrementalElementContentError.automaton_configuration" title="Permalink to this definition">¶</a></dt>
<dd><p>The <a class="reference internal" href="pyxb.binding.html#pyxb.binding.content.AutomatonConfiguration" title="pyxb.binding.content.AutomatonConfiguration"><code class="xref py py-obj docutils literal"><span class="pre">pyxb.binding.content.AutomatonConfiguration</span></code></a> representing the current state of the <a class="reference internal" href="#pyxb.exceptions_.IncrementalElementContentError.instance" title="pyxb.exceptions_.IncrementalElementContentError.instance"><code class="xref py py-obj docutils literal"><span class="pre">instance</span></code></a> content.</p>
</dd></dl>
<dl class="attribute">
<dt id="pyxb.exceptions_.IncrementalElementContentError.instance">
<code class="descname">instance</code><em class="property"> = None</em><a class="headerlink" href="#pyxb.exceptions_.IncrementalElementContentError.instance" title="Permalink to this definition">¶</a></dt>
<dd><p>The binding for which the <a class="reference internal" href="#pyxb.exceptions_.IncrementalElementContentError.value" title="pyxb.exceptions_.IncrementalElementContentError.value"><code class="xref py py-obj docutils literal"><span class="pre">value</span></code></a> could not be associated with an element.</p>
</dd></dl>
<dl class="attribute">
<dt id="pyxb.exceptions_.IncrementalElementContentError.value">
<code class="descname">value</code><em class="property"> = None</em><a class="headerlink" href="#pyxb.exceptions_.IncrementalElementContentError.value" title="Permalink to this definition">¶</a></dt>
<dd><p>The value that could not be associated with allowable content.</p>
</dd></dl>
</dd></dl>
<dl class="exception">
<dt id="pyxb.exceptions_.InvalidPreferredElementContentError">
<em class="property">exception </em><code class="descclassname">pyxb.exceptions_.</code><code class="descname">InvalidPreferredElementContentError</code><span class="sig-paren">(</span><em>instance</em>, <em>fac_configuration</em>, <em>symbols</em>, <em>symbol_set</em>, <em>preferred_symbol</em><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.exceptions_.InvalidPreferredElementContentError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pyxb.exceptions_.BatchElementContentError" title="pyxb.exceptions_.BatchElementContentError"><code class="xref py py-class docutils literal"><span class="pre">pyxb.exceptions_.BatchElementContentError</span></code></a></p>
<p>Use of a preferred element led to inability to generate a valid document</p>
<dl class="attribute">
<dt id="pyxb.exceptions_.InvalidPreferredElementContentError.preferred_symbol">
<code class="descname">preferred_symbol</code><em class="property"> = None</em><a class="headerlink" href="#pyxb.exceptions_.InvalidPreferredElementContentError.preferred_symbol" title="Permalink to this definition">¶</a></dt>
<dd><p>The element symbol which was not accepted.</p>
</dd></dl>
</dd></dl>
<dl class="exception">
<dt id="pyxb.exceptions_.LogicError">
<em class="property">exception </em><code class="descclassname">pyxb.exceptions_.</code><code class="descname">LogicError</code><a class="headerlink" href="#pyxb.exceptions_.LogicError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pyxb.exceptions_.PyXBError" title="pyxb.exceptions_.PyXBError"><code class="xref py py-class docutils literal"><span class="pre">pyxb.exceptions_.PyXBError</span></code></a></p>
<p>Raised when the code detects an implementation problem.</p>
</dd></dl>
<dl class="exception">
<dt id="pyxb.exceptions_.MissingAttributeError">
<em class="property">exception </em><code class="descclassname">pyxb.exceptions_.</code><code class="descname">MissingAttributeError</code><span class="sig-paren">(</span><em>type</em>, <em>tag</em>, <em>instance=None</em>, <em>location=None</em><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.exceptions_.MissingAttributeError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pyxb.exceptions_.AttributeValidationError" title="pyxb.exceptions_.AttributeValidationError"><code class="xref py py-class docutils literal"><span class="pre">pyxb.exceptions_.AttributeValidationError</span></code></a></p>
<p>Raised when an attribute that is required is missing in an element.</p>
</dd></dl>
<dl class="exception">
<dt id="pyxb.exceptions_.MixedContentError">
<em class="property">exception </em><code class="descclassname">pyxb.exceptions_.</code><code class="descname">MixedContentError</code><span class="sig-paren">(</span><em>instance</em>, <em>value</em>, <em>location=None</em><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.exceptions_.MixedContentError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pyxb.exceptions_.ContentValidationError" title="pyxb.exceptions_.ContentValidationError"><code class="xref py py-class docutils literal"><span class="pre">pyxb.exceptions_.ContentValidationError</span></code></a></p>
<p>Non-element content added to a complex type instance that does not support mixed content.</p>
<dl class="attribute">
<dt id="pyxb.exceptions_.MixedContentError.instance">
<code class="descname">instance</code><em class="property"> = None</em><a class="headerlink" href="#pyxb.exceptions_.MixedContentError.instance" title="Permalink to this definition">¶</a></dt>
<dd><p>The binding instance.</p>
</dd></dl>
<dl class="attribute">
<dt id="pyxb.exceptions_.MixedContentError.value">
<code class="descname">value</code><em class="property"> = None</em><a class="headerlink" href="#pyxb.exceptions_.MixedContentError.value" title="Permalink to this definition">¶</a></dt>
<dd><p>The non-element content.</p>
</dd></dl>
</dd></dl>
<dl class="exception">
<dt id="pyxb.exceptions_.NamespaceArchiveError">
<em class="property">exception </em><code class="descclassname">pyxb.exceptions_.</code><code class="descname">NamespaceArchiveError</code><span class="sig-paren">(</span><em>*args</em>, <em>**kw</em><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.exceptions_.NamespaceArchiveError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pyxb.exceptions_.PyXBException" title="pyxb.exceptions_.PyXBException"><code class="xref py py-class docutils literal"><span class="pre">pyxb.exceptions_.PyXBException</span></code></a></p>
<p>Problem related to namespace archives</p>
</dd></dl>
<dl class="exception">
<dt id="pyxb.exceptions_.NamespaceError">
<em class="property">exception </em><code class="descclassname">pyxb.exceptions_.</code><code class="descname">NamespaceError</code><span class="sig-paren">(</span><em>namespace</em>, <em>*args</em>, <em>**kw</em><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.exceptions_.NamespaceError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pyxb.exceptions_.PyXBException" title="pyxb.exceptions_.PyXBException"><code class="xref py py-class docutils literal"><span class="pre">pyxb.exceptions_.PyXBException</span></code></a></p>
<p>Violation of some rule relevant to XML Namespaces</p>
<dl class="method">
<dt id="pyxb.exceptions_.NamespaceError.namespace">
<code class="descname">namespace</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.exceptions_.NamespaceError.namespace" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="exception">
<dt id="pyxb.exceptions_.NamespaceUniquenessError">
<em class="property">exception </em><code class="descclassname">pyxb.exceptions_.</code><code class="descname">NamespaceUniquenessError</code><span class="sig-paren">(</span><em>namespace</em>, <em>*args</em>, <em>**kw</em><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.exceptions_.NamespaceUniquenessError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pyxb.exceptions_.NamespaceError" title="pyxb.exceptions_.NamespaceError"><code class="xref py py-class docutils literal"><span class="pre">pyxb.exceptions_.NamespaceError</span></code></a></p>
<p>Raised when an attempt is made to record multiple objects of the same name in the same namespace category.</p>
</dd></dl>
<dl class="exception">
<dt id="pyxb.exceptions_.NoNillableSupportError">
<em class="property">exception </em><code class="descclassname">pyxb.exceptions_.</code><code class="descname">NoNillableSupportError</code><span class="sig-paren">(</span><em>instance</em>, <em>location=None</em><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.exceptions_.NoNillableSupportError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pyxb.exceptions_.ElementValidationError" title="pyxb.exceptions_.ElementValidationError"><code class="xref py py-class docutils literal"><span class="pre">pyxb.exceptions_.ElementValidationError</span></code></a></p>
<p>Raised when invoking <a class="reference internal" href="pyxb.binding.html#pyxb.binding.basis._TypeBinding_mixin._setIsNil" title="pyxb.binding.basis._TypeBinding_mixin._setIsNil"><code class="xref py py-obj docutils literal"><span class="pre">_setIsNil</span></code></a> on a type that does not support nillable.</p>
<dl class="attribute">
<dt id="pyxb.exceptions_.NoNillableSupportError.instance">
<code class="descname">instance</code><em class="property"> = None</em><a class="headerlink" href="#pyxb.exceptions_.NoNillableSupportError.instance" title="Permalink to this definition">¶</a></dt>
<dd><p>The binding instance on which an inappropriate operation was invoked.</p>
</dd></dl>
</dd></dl>
<dl class="exception">
<dt id="pyxb.exceptions_.NonElementValidationError">
<em class="property">exception </em><code class="descclassname">pyxb.exceptions_.</code><code class="descname">NonElementValidationError</code><span class="sig-paren">(</span><em>element</em>, <em>location=None</em><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.exceptions_.NonElementValidationError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pyxb.exceptions_.ValidationError" title="pyxb.exceptions_.ValidationError"><code class="xref py py-class docutils literal"><span class="pre">pyxb.exceptions_.ValidationError</span></code></a></p>
<p>Raised when an element (or a value bound to an element) appears
in context that does not permit an element.</p>
<dl class="attribute">
<dt id="pyxb.exceptions_.NonElementValidationError.element">
<code class="descname">element</code><em class="property"> = None</em><a class="headerlink" href="#pyxb.exceptions_.NonElementValidationError.element" title="Permalink to this definition">¶</a></dt>
<dd><p>The content that is not permitted. This may be an element, or
a DOM representation that would have been made into an element had
matters progressed further.</p>
</dd></dl>
</dd></dl>
<dl class="exception">
<dt id="pyxb.exceptions_.NonPluralAppendError">
<em class="property">exception </em><code class="descclassname">pyxb.exceptions_.</code><code class="descname">NonPluralAppendError</code><span class="sig-paren">(</span><em>instance</em>, <em>element_declaration</em>, <em>value</em><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.exceptions_.NonPluralAppendError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pyxb.exceptions_.ContentValidationError" title="pyxb.exceptions_.ContentValidationError"><code class="xref py py-class docutils literal"><span class="pre">pyxb.exceptions_.ContentValidationError</span></code></a></p>
<p>Attempt to append to an element which does not accept multiple instances.</p>
<dl class="attribute">
<dt id="pyxb.exceptions_.NonPluralAppendError.element_declaration">
<code class="descname">element_declaration</code><em class="property"> = None</em><a class="headerlink" href="#pyxb.exceptions_.NonPluralAppendError.element_declaration" title="Permalink to this definition">¶</a></dt>
<dd><p>The <a class="reference internal" href="pyxb.binding.html#pyxb.binding.content.ElementDeclaration" title="pyxb.binding.content.ElementDeclaration"><code class="xref py py-obj docutils literal"><span class="pre">pyxb.binding.content.ElementDeclaration</span></code></a> contained in <a class="reference internal" href="#pyxb.exceptions_.NonPluralAppendError.instance" title="pyxb.exceptions_.NonPluralAppendError.instance"><code class="xref py py-obj docutils literal"><span class="pre">instance</span></code></a> that does not accept multiple instances</p>
</dd></dl>
<dl class="attribute">
<dt id="pyxb.exceptions_.NonPluralAppendError.instance">
<code class="descname">instance</code><em class="property"> = None</em><a class="headerlink" href="#pyxb.exceptions_.NonPluralAppendError.instance" title="Permalink to this definition">¶</a></dt>
<dd><p>The binding instance containing the element</p>
</dd></dl>
<dl class="attribute">
<dt id="pyxb.exceptions_.NonPluralAppendError.value">
<code class="descname">value</code><em class="property"> = None</em><a class="headerlink" href="#pyxb.exceptions_.NonPluralAppendError.value" title="Permalink to this definition">¶</a></dt>
<dd><p>The proposed addition to the element in the instance</p>
</dd></dl>
</dd></dl>
<dl class="exception">
<dt id="pyxb.exceptions_.NotComplexContentError">
<em class="property">exception </em><code class="descclassname">pyxb.exceptions_.</code><code class="descname">NotComplexContentError</code><span class="sig-paren">(</span><em>instance</em><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.exceptions_.NotComplexContentError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pyxb.exceptions_.BindingError" title="pyxb.exceptions_.BindingError"><code class="xref py py-class docutils literal"><span class="pre">pyxb.exceptions_.BindingError</span></code></a></p>
<p>An operation that requires a content model was invoked on a
complex type instance that has empty or simple content.</p>
<dl class="attribute">
<dt id="pyxb.exceptions_.NotComplexContentError.instance">
<code class="descname">instance</code><em class="property"> = None</em><a class="headerlink" href="#pyxb.exceptions_.NotComplexContentError.instance" title="Permalink to this definition">¶</a></dt>
<dd><p>The binding instance which should have had a content model.</p>
</dd></dl>
</dd></dl>
<dl class="exception">
<dt id="pyxb.exceptions_.NotInNamespaceError">
<em class="property">exception </em><code class="descclassname">pyxb.exceptions_.</code><code class="descname">NotInNamespaceError</code><span class="sig-paren">(</span><em>*args</em>, <em>**kw</em><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.exceptions_.NotInNamespaceError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pyxb.exceptions_.PyXBException" title="pyxb.exceptions_.PyXBException"><code class="xref py py-class docutils literal"><span class="pre">pyxb.exceptions_.PyXBException</span></code></a></p>
<p>Raised when a name is referenced that is not defined in the appropriate namespace.</p>
<dl class="attribute">
<dt id="pyxb.exceptions_.NotInNamespaceError._NotInNamespaceError__namespace">
<code class="descname">_NotInNamespaceError__namespace</code><em class="property"> = None</em><a class="headerlink" href="#pyxb.exceptions_.NotInNamespaceError._NotInNamespaceError__namespace" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="pyxb.exceptions_.NotInNamespaceError._NotInNamespaceError__ncName">
<code class="descname">_NotInNamespaceError__ncName</code><em class="property"> = None</em><a class="headerlink" href="#pyxb.exceptions_.NotInNamespaceError._NotInNamespaceError__ncName" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="exception">
<dt id="pyxb.exceptions_.NotSimpleContentError">
<em class="property">exception </em><code class="descclassname">pyxb.exceptions_.</code><code class="descname">NotSimpleContentError</code><span class="sig-paren">(</span><em>instance</em><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.exceptions_.NotSimpleContentError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pyxb.exceptions_.BindingError" title="pyxb.exceptions_.BindingError"><code class="xref py py-class docutils literal"><span class="pre">pyxb.exceptions_.BindingError</span></code></a></p>
<p>An operation that requires simple content was invoked on a
complex type instance that does not have simple content.</p>
<dl class="attribute">
<dt id="pyxb.exceptions_.NotSimpleContentError.instance">
<code class="descname">instance</code><em class="property"> = None</em><a class="headerlink" href="#pyxb.exceptions_.NotSimpleContentError.instance" title="Permalink to this definition">¶</a></dt>
<dd><p>The binding instance which should have had simple content.</p>
</dd></dl>
</dd></dl>
<dl class="exception">
<dt id="pyxb.exceptions_.OrphanElementContentError">
<em class="property">exception </em><code class="descclassname">pyxb.exceptions_.</code><code class="descname">OrphanElementContentError</code><span class="sig-paren">(</span><em>instance</em>, <em>preferred</em><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.exceptions_.OrphanElementContentError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pyxb.exceptions_.ContentValidationError" title="pyxb.exceptions_.ContentValidationError"><code class="xref py py-class docutils literal"><span class="pre">pyxb.exceptions_.ContentValidationError</span></code></a></p>
<p>An element expected to be used in content is not present in the instance.</p>
<p>This exception occurs in batch-mode validation when
<a class="reference internal" href="#pyxb.ValidationConfig.contentInfluencesGeneration" title="pyxb.ValidationConfig.contentInfluencesGeneration"><code class="xref py py-obj docutils literal"><span class="pre">pyxb.ValidationConfig.contentInfluencesGeneration</span></code></a> applies,
<a class="reference internal" href="#pyxb.ValidationConfig.orphanElementInContent" title="pyxb.ValidationConfig.orphanElementInContent"><code class="xref py py-obj docutils literal"><span class="pre">pyxb.ValidationConfig.orphanElementInContent</span></code></a> is set to
<a class="reference internal" href="#pyxb.ValidationConfig.RAISE_EXCEPTION" title="pyxb.ValidationConfig.RAISE_EXCEPTION"><code class="xref py py-obj docutils literal"><span class="pre">pyxb.ValidationConfig.RAISE_EXCEPTION</span></code></a>, and the content list
includes an element that is not in the binding instance
content.</p>
<dl class="attribute">
<dt id="pyxb.exceptions_.OrphanElementContentError.instance">
<code class="descname">instance</code><em class="property"> = None</em><a class="headerlink" href="#pyxb.exceptions_.OrphanElementContentError.instance" title="Permalink to this definition">¶</a></dt>
<dd><p>The binding instance.</p>
</dd></dl>
<dl class="attribute">
<dt id="pyxb.exceptions_.OrphanElementContentError.preferred">
<code class="descname">preferred</code><em class="property"> = None</em><a class="headerlink" href="#pyxb.exceptions_.OrphanElementContentError.preferred" title="Permalink to this definition">¶</a></dt>
<dd><p>An element value from the <a class="reference internal" href="#pyxb.exceptions_.OrphanElementContentError.instance" title="pyxb.exceptions_.OrphanElementContentError.instance"><code class="xref py py-obj docutils literal"><span class="pre">instance</span></code></a> <a class="reference internal" href="pyxb.binding.html#pyxb.binding.basis.complexTypeDefinition.content" title="pyxb.binding.basis.complexTypeDefinition.content"><code class="xref py py-obj docutils literal"><span class="pre">content</span></code></a> list which was not found in the <a class="reference internal" href="#pyxb.exceptions_.OrphanElementContentError.instance" title="pyxb.exceptions_.OrphanElementContentError.instance"><code class="xref py py-obj docutils literal"><span class="pre">instance</span></code></a>.</p>
</dd></dl>
</dd></dl>
<dl class="exception">
<dt id="pyxb.exceptions_.ProhibitedAttributeError">
<em class="property">exception </em><code class="descclassname">pyxb.exceptions_.</code><code class="descname">ProhibitedAttributeError</code><span class="sig-paren">(</span><em>type</em>, <em>tag</em>, <em>instance=None</em>, <em>location=None</em><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.exceptions_.ProhibitedAttributeError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pyxb.exceptions_.AttributeValidationError" title="pyxb.exceptions_.AttributeValidationError"><code class="xref py py-class docutils literal"><span class="pre">pyxb.exceptions_.AttributeValidationError</span></code></a></p>
<p>Raised when an attribute that is prohibited is set or referenced in an element.</p>
</dd></dl>
<dl class="exception">
<dt id="pyxb.exceptions_.PyXBError">
<em class="property">exception </em><code class="descclassname">pyxb.exceptions_.</code><code class="descname">PyXBError</code><a class="headerlink" href="#pyxb.exceptions_.PyXBError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">exceptions.Exception</span></code></p>
<p>Base class for exceptions that indicate a problem that the user probably can’t fix.</p>
</dd></dl>
<dl class="exception">
<dt id="pyxb.exceptions_.PyXBException">
<em class="property">exception </em><code class="descclassname">pyxb.exceptions_.</code><code class="descname">PyXBException</code><span class="sig-paren">(</span><em>*args</em>, <em>**kw</em><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.exceptions_.PyXBException" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">exceptions.Exception</span></code></p>
<p>Base class for exceptions that indicate a problem that the user should fix.</p>
<dl class="attribute">
<dt id="pyxb.exceptions_.PyXBException._args">
<code class="descname">_args</code><em class="property"> = None</em><a class="headerlink" href="#pyxb.exceptions_.PyXBException._args" title="Permalink to this definition">¶</a></dt>
<dd><p>The keywords passed to the exception constructor.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body">Do not pop values from the keywords array in subclass</td>
</tr>
</tbody>
</table>
<p>constructors that recognize and extract values from them. They
should be kept around so they’re accessible generically.</p>
</dd></dl>
<dl class="attribute">
<dt id="pyxb.exceptions_.PyXBException._kw">
<code class="descname">_kw</code><em class="property"> = None</em><a class="headerlink" href="#pyxb.exceptions_.PyXBException._kw" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="pyxb.exceptions_.PyXBException._str_from_unicode">
<code class="descname">_str_from_unicode</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.exceptions_.PyXBException._str_from_unicode" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="exception">
<dt id="pyxb.exceptions_.PyXBVersionError">
<em class="property">exception </em><code class="descclassname">pyxb.exceptions_.</code><code class="descname">PyXBVersionError</code><span class="sig-paren">(</span><em>*args</em>, <em>**kw</em><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.exceptions_.PyXBVersionError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pyxb.exceptions_.PyXBException" title="pyxb.exceptions_.PyXBException"><code class="xref py py-class docutils literal"><span class="pre">pyxb.exceptions_.PyXBException</span></code></a></p>
<p>Raised on import of a binding generated with a different version of PYXB</p>
</dd></dl>
<dl class="exception">
<dt id="pyxb.exceptions_.QNameResolutionError">
<em class="property">exception </em><code class="descclassname">pyxb.exceptions_.</code><code class="descname">QNameResolutionError</code><span class="sig-paren">(</span><em>message</em>, <em>qname</em>, <em>xmlns_context</em><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.exceptions_.QNameResolutionError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pyxb.exceptions_.NamespaceError" title="pyxb.exceptions_.NamespaceError"><code class="xref py py-class docutils literal"><span class="pre">pyxb.exceptions_.NamespaceError</span></code></a></p>
<p>Raised when a QName cannot be associated with a namespace.</p>
<dl class="attribute">
<dt id="pyxb.exceptions_.QNameResolutionError.namespaceContext">
<code class="descname">namespaceContext</code><em class="property"> = None</em><a class="headerlink" href="#pyxb.exceptions_.QNameResolutionError.namespaceContext" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="pyxb.exceptions_.QNameResolutionError.qname">
<code class="descname">qname</code><em class="property"> = None</em><a class="headerlink" href="#pyxb.exceptions_.QNameResolutionError.qname" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="exception">
<dt id="pyxb.exceptions_.ReservedNameError">
<em class="property">exception </em><code class="descclassname">pyxb.exceptions_.</code><code class="descname">ReservedNameError</code><span class="sig-paren">(</span><em>instance</em>, <em>name</em><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.exceptions_.ReservedNameError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pyxb.exceptions_.BindingError" title="pyxb.exceptions_.BindingError"><code class="xref py py-class docutils literal"><span class="pre">pyxb.exceptions_.BindingError</span></code></a></p>
<p>Reserved name set in binding instance.</p>
<dl class="attribute">
<dt id="pyxb.exceptions_.ReservedNameError.instance">
<code class="descname">instance</code><em class="property"> = None</em><a class="headerlink" href="#pyxb.exceptions_.ReservedNameError.instance" title="Permalink to this definition">¶</a></dt>
<dd><p>The binding instance.</p>
</dd></dl>
<dl class="attribute">
<dt id="pyxb.exceptions_.ReservedNameError.name">
<code class="descname">name</code><em class="property"> = None</em><a class="headerlink" href="#pyxb.exceptions_.ReservedNameError.name" title="Permalink to this definition">¶</a></dt>
<dd><p>The name that was caught being assigned</p>
</dd></dl>
</dd></dl>
<dl class="exception">
<dt id="pyxb.exceptions_.SchemaUniquenessError">
<em class="property">exception </em><code class="descclassname">pyxb.exceptions_.</code><code class="descname">SchemaUniquenessError</code><span class="sig-paren">(</span><em>namespace</em>, <em>schema_location</em>, <em>existing_schema</em>, <em>*args</em>, <em>**kw</em><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.exceptions_.SchemaUniquenessError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pyxb.exceptions_.PyXBException" title="pyxb.exceptions_.PyXBException"><code class="xref py py-class docutils literal"><span class="pre">pyxb.exceptions_.PyXBException</span></code></a></p>
<p>Raised when somebody tries to create a schema component using a
schema that has already been used in that namespace. Import and
include processing would have avoided this, so somebody asked for
it specifically.</p>
<dl class="method">
<dt id="pyxb.exceptions_.SchemaUniquenessError.existingSchema">
<code class="descname">existingSchema</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.exceptions_.SchemaUniquenessError.existingSchema" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="pyxb.exceptions_.SchemaUniquenessError.namespace">
<code class="descname">namespace</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.exceptions_.SchemaUniquenessError.namespace" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="pyxb.exceptions_.SchemaUniquenessError.schemaLocation">
<code class="descname">schemaLocation</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.exceptions_.SchemaUniquenessError.schemaLocation" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="exception">
<dt id="pyxb.exceptions_.SchemaValidationError">
<em class="property">exception </em><code class="descclassname">pyxb.exceptions_.</code><code class="descname">SchemaValidationError</code><span class="sig-paren">(</span><em>*args</em>, <em>**kw</em><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.exceptions_.SchemaValidationError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pyxb.exceptions_.PyXBException" title="pyxb.exceptions_.PyXBException"><code class="xref py py-class docutils literal"><span class="pre">pyxb.exceptions_.PyXBException</span></code></a></p>
<p>Raised when the XML hierarchy does not appear to be valid for an XML schema.</p>
</dd></dl>
<dl class="exception">
<dt id="pyxb.exceptions_.SimpleContentAbsentError">
<em class="property">exception </em><code class="descclassname">pyxb.exceptions_.</code><code class="descname">SimpleContentAbsentError</code><span class="sig-paren">(</span><em>instance</em>, <em>location</em><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.exceptions_.SimpleContentAbsentError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pyxb.exceptions_.ContentValidationError" title="pyxb.exceptions_.ContentValidationError"><code class="xref py py-class docutils literal"><span class="pre">pyxb.exceptions_.ContentValidationError</span></code></a></p>
<p>An instance with simple content was not provided with a value.</p>
<dl class="attribute">
<dt id="pyxb.exceptions_.SimpleContentAbsentError.instance">
<code class="descname">instance</code><em class="property"> = None</em><a class="headerlink" href="#pyxb.exceptions_.SimpleContentAbsentError.instance" title="Permalink to this definition">¶</a></dt>
<dd><p>The binding instance for which simple content is missing.</p>
</dd></dl>
</dd></dl>
<dl class="exception">
<dt id="pyxb.exceptions_.SimpleFacetValueError">
<em class="property">exception </em><code class="descclassname">pyxb.exceptions_.</code><code class="descname">SimpleFacetValueError</code><span class="sig-paren">(</span><em>type</em>, <em>value</em>, <em>facet</em>, <em>location=None</em><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.exceptions_.SimpleFacetValueError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pyxb.exceptions_.SimpleTypeValueError" title="pyxb.exceptions_.SimpleTypeValueError"><code class="xref py py-class docutils literal"><span class="pre">pyxb.exceptions_.SimpleTypeValueError</span></code></a></p>
<p>Raised when a simple type value does not satisfy a facet constraint.</p>
<p>This extends <a class="reference internal" href="#pyxb.exceptions_.SimpleTypeValueError" title="pyxb.exceptions_.SimpleTypeValueError"><code class="xref py py-obj docutils literal"><span class="pre">SimpleTypeValueError</span></code></a> with the <a class="reference internal" href="#pyxb.exceptions_.SimpleFacetValueError.facet" title="pyxb.exceptions_.SimpleFacetValueError.facet"><code class="xref py py-obj docutils literal"><span class="pre">facet</span></code></a> field which
can be used to determine why the value is unacceptable.</p>
<dl class="attribute">
<dt id="pyxb.exceptions_.SimpleFacetValueError.facet">
<code class="descname">facet</code><em class="property"> = None</em><a class="headerlink" href="#pyxb.exceptions_.SimpleFacetValueError.facet" title="Permalink to this definition">¶</a></dt>
<dd><p>The specific facet that is violated by the value.</p>
</dd></dl>
<dl class="attribute">
<dt id="pyxb.exceptions_.SimpleFacetValueError.type">
<code class="descname">type</code><em class="property"> = None</em><a class="headerlink" href="#pyxb.exceptions_.SimpleFacetValueError.type" title="Permalink to this definition">¶</a></dt>
<dd><p>The <a class="reference internal" href="pyxb.binding.html#pyxb.binding.basis.simpleTypeDefinition" title="pyxb.binding.basis.simpleTypeDefinition"><code class="xref py py-obj docutils literal"><span class="pre">pyxb.binding.basis.simpleTypeDefinition</span></code></a> that constrains values.</p>
</dd></dl>
<dl class="attribute">
<dt id="pyxb.exceptions_.SimpleFacetValueError.value">
<code class="descname">value</code><em class="property"> = None</em><a class="headerlink" href="#pyxb.exceptions_.SimpleFacetValueError.value" title="Permalink to this definition">¶</a></dt>
<dd><p>The value that violates the constraints of <a class="reference internal" href="#pyxb.exceptions_.SimpleFacetValueError.type" title="pyxb.exceptions_.SimpleFacetValueError.type"><code class="xref py py-obj docutils literal"><span class="pre">type</span></code></a>. In some
cases this is a tuple of arguments passed to a constructor that
failed with a built-in exception like:py:obj:<cite>ValueError</cite> or
<code class="xref py py-obj docutils literal"><span class="pre">OverflowError</span></code>.</p>
</dd></dl>
</dd></dl>
<dl class="exception">
<dt id="pyxb.exceptions_.SimpleListValueError">
<em class="property">exception </em><code class="descclassname">pyxb.exceptions_.</code><code class="descname">SimpleListValueError</code><span class="sig-paren">(</span><em>type</em>, <em>value</em>, <em>location=None</em><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.exceptions_.SimpleListValueError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pyxb.exceptions_.SimpleTypeValueError" title="pyxb.exceptions_.SimpleTypeValueError"><code class="xref py py-class docutils literal"><span class="pre">pyxb.exceptions_.SimpleTypeValueError</span></code></a></p>
<p>Raised when a list simple type contains a member that does not satisfy its constraints.</p>
<p>In this case, <code class="xref py py-obj docutils literal"><span class="pre">type</span></code> is the type of the list, and value
<code class="xref py py-obj docutils literal"><span class="pre">type._ItemType</span></code> is the type for which the <code class="xref py py-obj docutils literal"><span class="pre">value</span></code> is
unacceptable.</p>
</dd></dl>
<dl class="exception">
<dt id="pyxb.exceptions_.SimplePluralValueError">
<em class="property">exception </em><code class="descclassname">pyxb.exceptions_.</code><code class="descname">SimplePluralValueError</code><span class="sig-paren">(</span><em>type</em>, <em>value</em>, <em>location=None</em><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.exceptions_.SimplePluralValueError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pyxb.exceptions_.SimpleTypeValueError" title="pyxb.exceptions_.SimpleTypeValueError"><code class="xref py py-class docutils literal"><span class="pre">pyxb.exceptions_.SimpleTypeValueError</span></code></a></p>
<p>Raised when context requires a plural value.</p>
<p>Unlike <a class="reference internal" href="#pyxb.exceptions_.SimpleListValueError" title="pyxb.exceptions_.SimpleListValueError"><code class="xref py py-obj docutils literal"><span class="pre">SimpleListValueError</span></code></a>, in this case the plurality is
external to <code class="xref py py-obj docutils literal"><span class="pre">type</span></code>, for example when an element has simple
content and allows multiple occurrences.</p>
</dd></dl>
<dl class="exception">
<dt id="pyxb.exceptions_.SimpleTypeValueError">
<em class="property">exception </em><code class="descclassname">pyxb.exceptions_.</code><code class="descname">SimpleTypeValueError</code><span class="sig-paren">(</span><em>type</em>, <em>value</em>, <em>location=None</em><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.exceptions_.SimpleTypeValueError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pyxb.exceptions_.ValidationError" title="pyxb.exceptions_.ValidationError"><code class="xref py py-class docutils literal"><span class="pre">pyxb.exceptions_.ValidationError</span></code></a></p>
<p>Raised when a simple type value does not satisfy its constraints.</p>
<dl class="attribute">
<dt id="pyxb.exceptions_.SimpleTypeValueError.type">
<code class="descname">type</code><em class="property"> = None</em><a class="headerlink" href="#pyxb.exceptions_.SimpleTypeValueError.type" title="Permalink to this definition">¶</a></dt>
<dd><p>The <a class="reference internal" href="pyxb.binding.html#pyxb.binding.basis.simpleTypeDefinition" title="pyxb.binding.basis.simpleTypeDefinition"><code class="xref py py-obj docutils literal"><span class="pre">pyxb.binding.basis.simpleTypeDefinition</span></code></a> that constrains values.</p>
</dd></dl>
<dl class="attribute">
<dt id="pyxb.exceptions_.SimpleTypeValueError.value">
<code class="descname">value</code><em class="property"> = None</em><a class="headerlink" href="#pyxb.exceptions_.SimpleTypeValueError.value" title="Permalink to this definition">¶</a></dt>
<dd><p>The value that violates the constraints of <a class="reference internal" href="#pyxb.exceptions_.SimpleTypeValueError.type" title="pyxb.exceptions_.SimpleTypeValueError.type"><code class="xref py py-obj docutils literal"><span class="pre">type</span></code></a>. In some
cases this is a tuple of arguments passed to a constructor that
failed with a built-in exception like:py:obj:<cite>ValueError</cite> or
<code class="xref py py-obj docutils literal"><span class="pre">OverflowError</span></code>.</p>
</dd></dl>
</dd></dl>
<dl class="exception">
<dt id="pyxb.exceptions_.SimpleUnionValueError">
<em class="property">exception </em><code class="descclassname">pyxb.exceptions_.</code><code class="descname">SimpleUnionValueError</code><span class="sig-paren">(</span><em>type</em>, <em>value</em>, <em>location=None</em><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.exceptions_.SimpleUnionValueError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pyxb.exceptions_.SimpleTypeValueError" title="pyxb.exceptions_.SimpleTypeValueError"><code class="xref py py-class docutils literal"><span class="pre">pyxb.exceptions_.SimpleTypeValueError</span></code></a></p>
<p>Raised when a union simple type contains a member that does not satisfy its constraints.</p>
<p>In this case, <code class="xref py py-obj docutils literal"><span class="pre">type</span></code> is the type of the union, and the value
<code class="xref py py-obj docutils literal"><span class="pre">type._MemberTypes</span></code> is the set of types for which the value is
unacceptable.</p>
<p>The <code class="xref py py-obj docutils literal"><span class="pre">value</span></code> itself is the tuple of arguments passed to the
constructor for the union.</p>
</dd></dl>
<dl class="exception">
<dt id="pyxb.exceptions_.StructuralBadDocumentError">
<em class="property">exception </em><code class="descclassname">pyxb.exceptions_.</code><code class="descname">StructuralBadDocumentError</code><span class="sig-paren">(</span><em>*args</em>, <em>**kw</em><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.exceptions_.StructuralBadDocumentError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pyxb.exceptions_.BadDocumentError" title="pyxb.exceptions_.BadDocumentError"><code class="xref py py-class docutils literal"><span class="pre">pyxb.exceptions_.BadDocumentError</span></code></a></p>
<p>Raised when processing document and the content model is not satisfied.</p>
<dl class="attribute">
<dt id="pyxb.exceptions_.StructuralBadDocumentError.container">
<code class="descname">container</code><a class="headerlink" href="#pyxb.exceptions_.StructuralBadDocumentError.container" title="Permalink to this definition">¶</a></dt>
<dd><p>The <a class="reference internal" href="pyxb.binding.html#pyxb.binding.basis.complexTypeDefinition" title="pyxb.binding.basis.complexTypeDefinition"><code class="xref py py-obj docutils literal"><span class="pre">pyxb.binding.basis.complexTypeDefinition</span></code></a> instance to which the content would belong, if available.</p>
</dd></dl>
<dl class="attribute">
<dt id="pyxb.exceptions_.StructuralBadDocumentError.content">
<code class="descname">content</code><a class="headerlink" href="#pyxb.exceptions_.StructuralBadDocumentError.content" title="Permalink to this definition">¶</a></dt>
<dd><p>The value which could not be reconciled with the content model.</p>
</dd></dl>
<dl class="attribute">
<dt id="pyxb.exceptions_.StructuralBadDocumentError.element_use">
<code class="descname">element_use</code><a class="headerlink" href="#pyxb.exceptions_.StructuralBadDocumentError.element_use" title="Permalink to this definition">¶</a></dt>
<dd><p>The <a class="reference internal" href="pyxb.binding.html#pyxb.binding.content.ElementDeclaration" title="pyxb.binding.content.ElementDeclaration"><code class="xref py py-obj docutils literal"><span class="pre">pyxb.binding.content.ElementDeclaration</span></code></a> instance to which the content should conform, if available.</p>
</dd></dl>
</dd></dl>
<dl class="exception">
<dt id="pyxb.exceptions_.UnboundElementError">
<em class="property">exception </em><code class="descclassname">pyxb.exceptions_.</code><code class="descname">UnboundElementError</code><span class="sig-paren">(</span><em>instance</em><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.exceptions_.UnboundElementError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pyxb.exceptions_.DOMGenerationError" title="pyxb.exceptions_.DOMGenerationError"><code class="xref py py-class docutils literal"><span class="pre">pyxb.exceptions_.DOMGenerationError</span></code></a></p>
<p>An instance converting to DOM had no bound element.</p>
<dl class="attribute">
<dt id="pyxb.exceptions_.UnboundElementError.instance">
<code class="descname">instance</code><em class="property"> = None</em><a class="headerlink" href="#pyxb.exceptions_.UnboundElementError.instance" title="Permalink to this definition">¶</a></dt>
<dd><p>The binding instance. This is missing an element binding (via
<a class="reference internal" href="pyxb.binding.html#pyxb.binding.basis._TypeBinding_mixin._element" title="pyxb.binding.basis._TypeBinding_mixin._element"><code class="xref py py-obj docutils literal"><span class="pre">pyxb.binding.basis._TypeBinding_mixin._element</span></code></a>) and no
<code class="xref py py-obj docutils literal"><span class="pre">element_name</span></code> was passed.</p>
</dd></dl>
</dd></dl>
<dl class="exception">
<dt id="pyxb.exceptions_.UnprocessedElementContentError">
<em class="property">exception </em><code class="descclassname">pyxb.exceptions_.</code><code class="descname">UnprocessedElementContentError</code><span class="sig-paren">(</span><em>instance</em>, <em>fac_configuration</em>, <em>symbols</em>, <em>symbol_set</em><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.exceptions_.UnprocessedElementContentError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pyxb.exceptions_.BatchElementContentError" title="pyxb.exceptions_.BatchElementContentError"><code class="xref py py-class docutils literal"><span class="pre">pyxb.exceptions_.BatchElementContentError</span></code></a></p>
<p>Validation of an instance produced an accepting state but left element material unconsumed.</p>
<p>This exception occurs in batch-mode validation.</p>
</dd></dl>
<dl class="exception">
<dt id="pyxb.exceptions_.UnprocessedKeywordContentError">
<em class="property">exception </em><code class="descclassname">pyxb.exceptions_.</code><code class="descname">UnprocessedKeywordContentError</code><span class="sig-paren">(</span><em>instance</em>, <em>keywords</em>, <em>location=None</em><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.exceptions_.UnprocessedKeywordContentError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pyxb.exceptions_.ContentValidationError" title="pyxb.exceptions_.ContentValidationError"><code class="xref py py-class docutils literal"><span class="pre">pyxb.exceptions_.ContentValidationError</span></code></a></p>
<p>A complex type constructor was provided with keywords that could not be recognized.</p>
<dl class="attribute">
<dt id="pyxb.exceptions_.UnprocessedKeywordContentError.instance">
<code class="descname">instance</code><em class="property"> = None</em><a class="headerlink" href="#pyxb.exceptions_.UnprocessedKeywordContentError.instance" title="Permalink to this definition">¶</a></dt>
<dd><p>The binding instance being constructed.</p>
</dd></dl>
<dl class="attribute">
<dt id="pyxb.exceptions_.UnprocessedKeywordContentError.keywords">
<code class="descname">keywords</code><em class="property"> = None</em><a class="headerlink" href="#pyxb.exceptions_.UnprocessedKeywordContentError.keywords" title="Permalink to this definition">¶</a></dt>
<dd><p>The keywords that could not be recognized. These may have been
intended to be attributes or elements, but cannot be identified as
either.</p>
</dd></dl>
</dd></dl>
<dl class="exception">
<dt id="pyxb.exceptions_.UnrecognizedAttributeError">
<em class="property">exception </em><code class="descclassname">pyxb.exceptions_.</code><code class="descname">UnrecognizedAttributeError</code><span class="sig-paren">(</span><em>type</em>, <em>tag</em>, <em>instance=None</em>, <em>location=None</em><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.exceptions_.UnrecognizedAttributeError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pyxb.exceptions_.AttributeValidationError" title="pyxb.exceptions_.AttributeValidationError"><code class="xref py py-class docutils literal"><span class="pre">pyxb.exceptions_.AttributeValidationError</span></code></a></p>
<p>Attempt to reference an attribute not sanctioned by content model.</p>
</dd></dl>
<dl class="exception">
<dt id="pyxb.exceptions_.UnrecognizedContentError">
<em class="property">exception </em><code class="descclassname">pyxb.exceptions_.</code><code class="descname">UnrecognizedContentError</code><span class="sig-paren">(</span><em>instance</em>, <em>automaton_configuration</em>, <em>value</em>, <em>location=None</em><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.exceptions_.UnrecognizedContentError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pyxb.exceptions_.IncrementalElementContentError" title="pyxb.exceptions_.IncrementalElementContentError"><code class="xref py py-class docutils literal"><span class="pre">pyxb.exceptions_.IncrementalElementContentError</span></code></a></p>
<p>Element or element-like content could not be validly associated with an sub-element in the content model.</p>
<p>This exception occurs when content is added to an element during incremental validation.</p>
<dl class="method">
<dt id="pyxb.exceptions_.UnrecognizedContentError.details">
<code class="descname">details</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.exceptions_.UnrecognizedContentError.details" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="exception">
<dt id="pyxb.exceptions_.UnrecognizedDOMRootNodeError">
<em class="property">exception </em><code class="descclassname">pyxb.exceptions_.</code><code class="descname">UnrecognizedDOMRootNodeError</code><span class="sig-paren">(</span><em>node</em><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.exceptions_.UnrecognizedDOMRootNodeError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pyxb.exceptions_.StructuralBadDocumentError" title="pyxb.exceptions_.StructuralBadDocumentError"><code class="xref py py-class docutils literal"><span class="pre">pyxb.exceptions_.StructuralBadDocumentError</span></code></a></p>
<p>A root DOM node could not be resolved to a schema element</p>
<dl class="method">
<dt id="pyxb.exceptions_.UnrecognizedDOMRootNodeError._UnrecognizedDOMRootNodeError__get_node_name">
<code class="descname">_UnrecognizedDOMRootNodeError__get_node_name</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.exceptions_.UnrecognizedDOMRootNodeError._UnrecognizedDOMRootNodeError__get_node_name" title="Permalink to this definition">¶</a></dt>
<dd><p>The QName of the <a class="reference internal" href="#pyxb.exceptions_.UnrecognizedDOMRootNodeError.node" title="pyxb.exceptions_.UnrecognizedDOMRootNodeError.node"><code class="xref py py-obj docutils literal"><span class="pre">node</span></code></a> as a <a class="reference internal" href="pyxb.namespace.html#pyxb.namespace.ExpandedName" title="pyxb.namespace.ExpandedName"><code class="xref py py-obj docutils literal"><span class="pre">pyxb.namespace.ExpandedName</span></code></a></p>
</dd></dl>
<dl class="attribute">
<dt id="pyxb.exceptions_.UnrecognizedDOMRootNodeError.node">
<code class="descname">node</code><em class="property"> = None</em><a class="headerlink" href="#pyxb.exceptions_.UnrecognizedDOMRootNodeError.node" title="Permalink to this definition">¶</a></dt>
<dd><p>The <code class="xref py py-obj docutils literal"><span class="pre">xml.dom.Element</span></code> instance that could not be recognized</p>
</dd></dl>
<dl class="attribute">
<dt id="pyxb.exceptions_.UnrecognizedDOMRootNodeError.node_name">
<code class="descname">node_name</code><a class="headerlink" href="#pyxb.exceptions_.UnrecognizedDOMRootNodeError.node_name" title="Permalink to this definition">¶</a></dt>
<dd><p>The QName of the <a class="reference internal" href="#pyxb.exceptions_.UnrecognizedDOMRootNodeError.node" title="pyxb.exceptions_.UnrecognizedDOMRootNodeError.node"><code class="xref py py-obj docutils literal"><span class="pre">node</span></code></a> as a <a class="reference internal" href="pyxb.namespace.html#pyxb.namespace.ExpandedName" title="pyxb.namespace.ExpandedName"><code class="xref py py-obj docutils literal"><span class="pre">pyxb.namespace.ExpandedName</span></code></a></p>
</dd></dl>
</dd></dl>
<dl class="exception">
<dt id="pyxb.exceptions_.UsageError">
<em class="property">exception </em><code class="descclassname">pyxb.exceptions_.</code><code class="descname">UsageError</code><a class="headerlink" href="#pyxb.exceptions_.UsageError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pyxb.exceptions_.PyXBError" title="pyxb.exceptions_.PyXBError"><code class="xref py py-class docutils literal"><span class="pre">pyxb.exceptions_.PyXBError</span></code></a></p>
<p>Raised when the code detects user violation of an API.</p>
</dd></dl>
<dl class="exception">
<dt id="pyxb.exceptions_.ValidationError">
<em class="property">exception </em><code class="descclassname">pyxb.exceptions_.</code><code class="descname">ValidationError</code><span class="sig-paren">(</span><em>*args</em>, <em>**kw</em><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.exceptions_.ValidationError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pyxb.exceptions_.PyXBException" title="pyxb.exceptions_.PyXBException"><code class="xref py py-class docutils literal"><span class="pre">pyxb.exceptions_.PyXBException</span></code></a></p>
<p>Raised when something in the infoset fails to satisfy a content model or attribute requirement.</p>
<p>All validation errors include a <a class="reference internal" href="#pyxb.exceptions_.ValidationError.location" title="pyxb.exceptions_.ValidationError.location"><code class="xref py py-obj docutils literal"><span class="pre">location</span></code></a> attribute which shows
where in the original XML the problem occurred. The attribute may
be <code class="xref py py-obj docutils literal"><span class="pre">None</span></code> if the content did not come from an XML document, or
the underlying XML infrastructure did not provide a location.</p>
<p>More refined validation error exception classes add more attributes.</p>
<dl class="method">
<dt id="pyxb.exceptions_.ValidationError.details">
<code class="descname">details</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pyxb.exceptions_.ValidationError.details" title="Permalink to this definition">¶</a></dt>
<dd><p>Provide information describing why validation failed.</p>
<p>In many cases, this is simply the informal string content that
would be obtained through the <code class="xref py py-obj docutils literal"><span class="pre">str</span></code> built-in function. For
certain errors this method gives more details on what would be
acceptable and where the descriptions can be found in the
original schema.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">a string description of validation failure</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="attribute">
<dt id="pyxb.exceptions_.ValidationError.location">
<code class="descname">location</code><em class="property"> = None</em><a class="headerlink" href="#pyxb.exceptions_.ValidationError.location" title="Permalink to this definition">¶</a></dt>
<dd><p>Where the error occurred in the document being parsed, if
available. This will be <code class="xref py py-obj docutils literal"><span class="pre">None</span></code>, or an instance of
<a class="reference internal" href="pyxb.utils.html#pyxb.utils.utility.Location" title="pyxb.utils.utility.Location"><code class="xref py py-obj docutils literal"><span class="pre">pyxb.utils.utility.Location</span></code></a>.</p>
</dd></dl>
</dd></dl>
</div>
<div class="section" id="module-pyxb">
<span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-pyxb" title="Permalink to this headline">¶</a></h2>
<p>PyXB stands for Python U{W3C XML
Schema<<a class="reference external" href="http://www.w3.org/XML/Schema">http://www.w3.org/XML/Schema</a>>} Bindings, and is pronounced
“pixbee”. It enables translation between XML instance documents and
Python objects following rules specified by an XML Schema document.</p>
<p>This is the top-level entrypoint to the PyXB system. Importing this
gets you all the <a class="reference internal" href="#pyxb.exceptions_.PyXBException" title="pyxb.exceptions_.PyXBException"><code class="xref py py-obj docutils literal"><span class="pre">exceptions</span></code></a>, and
<a class="reference internal" href="pyxb.namespace.html#module-pyxb.namespace" title="pyxb.namespace"><code class="xref py py-obj docutils literal"><span class="pre">pyxb.namespace</span></code></a>. For more functionality, delve into these
submodules:</p>
<blockquote>
<div><ul class="simple">
<li><a class="reference internal" href="pyxb.xmlschema.html#module-pyxb.xmlschema" title="pyxb.xmlschema"><code class="xref py py-obj docutils literal"><span class="pre">pyxb.xmlschema</span></code></a> Module holding the
<a class="reference internal" href="pyxb.xmlschema.html#module-pyxb.xmlschema.structures" title="pyxb.xmlschema.structures"><code class="xref py py-obj docutils literal"><span class="pre">structures</span></code></a> that convert XMLSchema
from a DOM model to a Python class model based on the XMLSchema
components. Use this when you need to operate on the component
model.</li>
<li><a class="reference internal" href="pyxb.binding.html#module-pyxb.binding" title="pyxb.binding"><code class="xref py py-obj docutils literal"><span class="pre">pyxb.binding</span></code></a> Module used to generate the bindings and at runtime
to support the generated bindings. Use this if you need to use the
binding model or content model.</li>
<li><a class="reference internal" href="pyxb.utils.html#module-pyxb.utils" title="pyxb.utils"><code class="xref py py-obj docutils literal"><span class="pre">pyxb.utils</span></code></a> Common utilities used in parsing, generating, and
executing. The submodules must be imported separately.</li>
</ul>
</div></blockquote>
<dl class="class">
<dt>
<em class="property">class </em><code class="descclassname">pyxb.</code><code class="descname">BIND</code><span class="sig-paren">(</span><em>*args</em>, <em>**kw</em><span class="sig-paren">)</span></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">object</span></code></p>
<p>Bundle data for automated binding generation.</p>
<p>Instances of this class capture positional and keyword arguments that are
used to create binding instances based on context. For example, if <code class="xref py py-obj docutils literal"><span class="pre">w</span></code>
is an instance of a complex type whose <code class="xref py py-obj docutils literal"><span class="pre">option</span></code> element is declared to be
an anonymous class with simple content of type integer and an attribute of
<code class="xref py py-obj docutils literal"><span class="pre">units</span></code>, a correct assignment to that element could be achieved with:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">w</span><span class="o">.</span><span class="n">option</span> <span class="o">=</span> <span class="n">BIND</span><span class="p">(</span><span class="mi">54</span><span class="p">,</span> <span class="n">units</span><span class="o">=</span><span class="s2">"m"</span><span class="p">)</span>
</pre></div>
</div>
<dl class="attribute">
<dt>
<code class="descname">_BIND__args</code><em class="property"> = None</em></dt>
<dd></dd></dl>
<dl class="attribute">
<dt>
<code class="descname">_BIND__kw</code><em class="property"> = None</em></dt>
<dd></dd></dl>
<dl class="method">
<dt>
<code class="descname">createInstance</code><span class="sig-paren">(</span><em>factory</em>, <em>**kw</em><span class="sig-paren">)</span></dt>
<dd><p>Invoke the given factory method.</p>
<p>Position arguments to the factory are those cached in this instance.
Keyword arguments are the ones on the command line, updated from the
ones in this instance.</p>
</dd></dl>
</dd></dl>
<dl class="function">
<dt>
<code class="descclassname">pyxb.</code><code class="descname">NonElementContent</code><span class="sig-paren">(</span><em>instance</em><span class="sig-paren">)</span></dt>
<dd><p>Return an iterator producing the non-element content of the provided instance.</p>
<p>The catenated text of the non-element content of an instance can
be obtained with:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">text</span> <span class="o">=</span> <span class="n">six</span><span class="o">.</span><span class="n">u</span><span class="p">(</span><span class="s1">''</span><span class="p">)</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">pyxb</span><span class="o">.</span><span class="n">NonElementContent</span><span class="p">(</span><span class="n">instance</span><span class="p">))</span>
</pre></div>
</div>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>instance</strong> – An instance of <a class="reference internal" href="pyxb.binding.html#pyxb.binding.basis.complexTypeDefinition" title="pyxb.binding.basis.complexTypeDefinition"><code class="xref py py-obj docutils literal"><span class="pre">pyxb.binding.basis.complexTypeDefinition</span></code></a>.</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">an iterator producing text values</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt>
<code class="descclassname">pyxb.</code><code class="descname">PreserveInputTimeZone</code><span class="sig-paren">(</span><em>value=None</em><span class="sig-paren">)</span></dt>
<dd><p>Control whether time values are converted to UTC during input.</p>
<p>The specification <<a class="reference external" href="http://www.w3.org/TR/xmlschema-2/#dateTime">http://www.w3.org/TR/xmlschema-2/#dateTime</a>> makes
clear that timezoned times are in UTC and that times in other timezones
are to be translated to UTC when converted from literal to value form.
Provide an option to bypass this step, so the input timezone is preserved.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body">Naive processing of unnormalized times–i.e., ignoring the</td>
</tr>
</tbody>
</table>
<p><code class="xref py py-obj docutils literal"><span class="pre">tzinfo</span></code> field–may result in errors.</p>
</dd></dl>
<dl class="function">
<dt>
<code class="descclassname">pyxb.</code><code class="descname">RequireValidWhenGenerating</code><span class="sig-paren">(</span><em>value=None</em><span class="sig-paren">)</span></dt>
<dd><p>Query or set a flag that controls validation checking in XML generation.</p>
<p>Normally any attempts to convert a binding instance to a DOM or XML
representation requires that the binding validate against the content
model, since only in this way can the content be generated in the correct
order. In some cases it may be necessary or useful to generate a document
from a binding that is incomplete. If validation is not required, the
generated documents may not validate even if the content validates,
because ordering constraints will be ignored.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>value</strong> – If absent or <code class="xref py py-obj docutils literal"><span class="pre">None</span></code>, no change is made; otherwise, this</td>
</tr>
</tbody>
</table>
<p>enables (<code class="xref py py-obj docutils literal"><span class="pre">True</span></code>) or disables (<code class="xref py py-obj docutils literal"><span class="pre">False</span></code>) the requirement that instances
validate before being converted to XML.
:type value: <code class="xref py py-obj docutils literal"><span class="pre">bool</span></code></p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><code class="xref py py-obj docutils literal"><span class="pre">True</span></code> iff attempts to generate XML for a binding that does not</td>
</tr>
</tbody>
</table>
<p>validate should raise an exception.</p>
</dd></dl>
<dl class="function">
<dt>
<code class="descclassname">pyxb.</code><code class="descname">RequireValidWhenParsing</code><span class="sig-paren">(</span><em>value=None</em><span class="sig-paren">)</span></dt>
<dd><p>Query or set a flag that controls validation checking in XML parsing.</p>
<p>Normally any attempts to convert XML to a binding instance to a binding
instance requires that the document validate against the content model.
In some cases it may be necessary or useful to process a document that is
incomplete. If validation is not required, the generated documents may
not validate even if the content validates, because ordering constraints
will be ignored.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>value</strong> – If absent or <code class="xref py py-obj docutils literal"><span class="pre">None</span></code>, no change is made; otherwise, this</td>
</tr>
</tbody>
</table>
<p>enables (<code class="xref py py-obj docutils literal"><span class="pre">True</span></code>) or disables (<code class="xref py py-obj docutils literal"><span class="pre">False</span></code>) the requirement that documents
validate when being converted to bindings.
:type value: <code class="xref py py-obj docutils literal"><span class="pre">bool</span></code></p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><code class="xref py py-obj docutils literal"><span class="pre">True</span></code> iff attempts to generate bindings for a document that</td>
</tr>
</tbody>
</table>
<p>does not validate should raise an exception.</p>
</dd></dl>
<dl class="class">
<dt>
<em class="property">class </em><code class="descclassname">pyxb.</code><code class="descname">ValidationConfig</code></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">object</span></code></p>
<p>Class holding configuration related to validation.</p>
<p><code class="xref py py-obj docutils literal"><span class="pre">pyxb.GlobalValidationConfig</span></code> is available to influence validation in all
contexts. Each binding class has a reference to an instance of this
class, which can be inspected using
<a class="reference internal" href="pyxb.binding.html#pyxb.binding.basis._TypeBinding_mixin._GetValidationConfig" title="pyxb.binding.basis._TypeBinding_mixin._GetValidationConfig"><code class="xref py py-obj docutils literal"><span class="pre">pyxb.binding.basis._TypeBinding_mixin._GetValidationConfig</span></code></a> and changed
using <a class="reference internal" href="pyxb.binding.html#pyxb.binding.basis._TypeBinding_mixin._SetValidationConfig" title="pyxb.binding.basis._TypeBinding_mixin._SetValidationConfig"><code class="xref py py-obj docutils literal"><span class="pre">pyxb.binding.basis._TypeBinding_mixin._SetValidationConfig</span></code></a>. Each
binding instance has a reference inherited from its class which can be
inspected using <a class="reference internal" href="pyxb.binding.html#pyxb.binding.basis._TypeBinding_mixin._validationConfig" title="pyxb.binding.basis._TypeBinding_mixin._validationConfig"><code class="xref py py-obj docutils literal"><span class="pre">pyxb.binding.basis._TypeBinding_mixin._validationConfig</span></code></a>
and changed using
<a class="reference internal" href="pyxb.binding.html#pyxb.binding.basis._TypeBinding_mixin._setValidationConfig" title="pyxb.binding.basis._TypeBinding_mixin._setValidationConfig"><code class="xref py py-obj docutils literal"><span class="pre">pyxb.binding.basis._TypeBinding_mixin._setValidationConfig</span></code></a>.</p>
<p>This allows fine control on a per class and per-instance basis.</p>
<p><a class="reference internal" href="#pyxb.ValidationConfig.forBinding" title="pyxb.ValidationConfig.forBinding"><code class="xref py py-obj docutils literal"><span class="pre">forBinding</span></code></a> replaces <a class="reference internal" href="#pyxb.RequireValidWhenParsing" title="pyxb.RequireValidWhenParsing"><code class="xref py py-obj docutils literal"><span class="pre">RequireValidWhenParsing</span></code></a>.</p>
<p><a class="reference internal" href="#pyxb.ValidationConfig.forDocument" title="pyxb.ValidationConfig.forDocument"><code class="xref py py-obj docutils literal"><span class="pre">forDocument</span></code></a> replaces <a class="reference internal" href="#pyxb.RequireValidWhenGenerating" title="pyxb.RequireValidWhenGenerating"><code class="xref py py-obj docutils literal"><span class="pre">RequireValidWhenGenerating</span></code></a>.</p>
<p><a class="reference internal" href="#pyxb.ValidationConfig.contentInfluencesGeneration" title="pyxb.ValidationConfig.contentInfluencesGeneration"><code class="xref py py-obj docutils literal"><span class="pre">contentInfluencesGeneration</span></code></a>, <a class="reference internal" href="#pyxb.ValidationConfig.orphanElementInContent" title="pyxb.ValidationConfig.orphanElementInContent"><code class="xref py py-obj docutils literal"><span class="pre">orphanElementInContent</span></code></a>, and
<a class="reference internal" href="#pyxb.ValidationConfig.invalidElementInContent" title="pyxb.ValidationConfig.invalidElementInContent"><code class="xref py py-obj docutils literal"><span class="pre">invalidElementInContent</span></code></a> control how
<a class="reference internal" href="pyxb.binding.html#pyxb.binding.basis.complexTypeDefinition.orderedContent" title="pyxb.binding.basis.complexTypeDefinition.orderedContent"><code class="xref py py-obj docutils literal"><span class="pre">pyxb.binding.basis.complexTypeDefinition.orderedContent</span></code></a> affects
generated documents.</p>
<dl class="attribute">
<dt>
<code class="descname">ALWAYS</code><em class="property"> = -1</em></dt>
<dd><p>Always do it.</p>
</dd></dl>
<dl class="attribute">
<dt>
<code class="descname">GIVE_UP</code><em class="property"> = 2</em></dt>
<dd><p>If an error occurs ignore it and stop using whatever provided the cause
of the error. (E.g., if an element in a content list fails stop
processing the content list and execute as though it was absent).</p>
</dd></dl>
<dl class="attribute">
<dt>
<code class="descname">IGNORE_ONCE</code><em class="property"> = 1</em></dt>
<dd><p>If an error occurs ignore it and continue with the next one. (E.g., if
an element in a content list fails skip it and continue with the next
element in the list.)</p>
</dd></dl>
<dl class="attribute">
<dt>
<code class="descname">MIXED_ONLY</code><em class="property"> = 4</em></dt>
<dd><p>Only when content type is mixed.</p>
</dd></dl>
<dl class="attribute">
<dt>
<code class="descname">NEVER</code><em class="property"> = 0</em></dt>
<dd><p>Never do it.</p>
</dd></dl>
<dl class="attribute">
<dt>
<code class="descname">RAISE_EXCEPTION</code><em class="property"> = 3</em></dt>
<dd><p>If an error occurs, raise an exception.</p>
</dd></dl>
<dl class="attribute">
<dt>
<code class="descname">_ValidationConfig__contentInfluencesGeneration</code><em class="property"> = 4</em></dt>
<dd></dd></dl>
<dl class="attribute">
<dt>
<code class="descname">_ValidationConfig__forBinding</code><em class="property"> = True</em></dt>
<dd></dd></dl>
<dl class="attribute">
<dt>
<code class="descname">_ValidationConfig__forDocument</code><em class="property"> = True</em></dt>
<dd></dd></dl>
<dl class="method">
<dt>
<code class="descname">_ValidationConfig__getContentInfluencesGeneration</code><span class="sig-paren">(</span><span class="sig-paren">)</span></dt>
<dd><p>Determine whether complex type content influences element order in
document generation.</p>
<p>The value is one of <a class="reference internal" href="#pyxb.ValidationConfig.ALWAYS" title="pyxb.ValidationConfig.ALWAYS"><code class="xref py py-obj docutils literal"><span class="pre">ALWAYS</span></code></a>, <a class="reference internal" href="#pyxb.ValidationConfig.NEVER" title="pyxb.ValidationConfig.NEVER"><code class="xref py py-obj docutils literal"><span class="pre">NEVER</span></code></a>, <a class="reference internal" href="#pyxb.ValidationConfig.MIXED_ONLY" title="pyxb.ValidationConfig.MIXED_ONLY"><code class="xref py py-obj docutils literal"><span class="pre">MIXED_ONLY</span></code></a> (default).</p>
</dd></dl>
<dl class="method">
<dt>
<code class="descname">_ValidationConfig__getInvalidElementInContent</code><span class="sig-paren">(</span><span class="sig-paren">)</span></dt>
<dd><p>How to handle invalid elements in content lists.</p>
<p>The value is one of <a class="reference internal" href="#pyxb.ValidationConfig.IGNORE_ONCE" title="pyxb.ValidationConfig.IGNORE_ONCE"><code class="xref py py-obj docutils literal"><span class="pre">IGNORE_ONCE</span></code></a> (default), <a class="reference internal" href="#pyxb.ValidationConfig.GIVE_UP" title="pyxb.ValidationConfig.GIVE_UP"><code class="xref py py-obj docutils literal"><span class="pre">GIVE_UP</span></code></a>,
<a class="reference internal" href="#pyxb.ValidationConfig.RAISE_EXCEPTION" title="pyxb.ValidationConfig.RAISE_EXCEPTION"><code class="xref py py-obj docutils literal"><span class="pre">RAISE_EXCEPTION</span></code></a>.</p>
</dd></dl>
<dl class="method">
<dt>
<code class="descname">_ValidationConfig__getOrphanElementInContent</code><span class="sig-paren">(</span><span class="sig-paren">)</span></dt>
<dd><p>How to handle unrecognized elements in content lists.</p>
<p>This is used when consulting a complex type instance content list to
influence the generation of documents from a binding instance.</p>
<p>The value is one of <a class="reference internal" href="#pyxb.ValidationConfig.IGNORE_ONCE" title="pyxb.ValidationConfig.IGNORE_ONCE"><code class="xref py py-obj docutils literal"><span class="pre">IGNORE_ONCE</span></code></a> (default), <a class="reference internal" href="#pyxb.ValidationConfig.GIVE_UP" title="pyxb.ValidationConfig.GIVE_UP"><code class="xref py py-obj docutils literal"><span class="pre">GIVE_UP</span></code></a>,
<a class="reference internal" href="#pyxb.ValidationConfig.RAISE_EXCEPTION" title="pyxb.ValidationConfig.RAISE_EXCEPTION"><code class="xref py py-obj docutils literal"><span class="pre">RAISE_EXCEPTION</span></code></a>.</p>
</dd></dl>
<dl class="attribute">
<dt>
<code class="descname">_ValidationConfig__invalidElementInContent</code><em class="property"> = 1</em></dt>
<dd></dd></dl>
<dl class="attribute">
<dt>
<code class="descname">_ValidationConfig__orphanElementInContent</code><em class="property"> = 1</em></dt>
<dd></dd></dl>
<dl class="method">
<dt>
<code class="descname">_getForBinding</code><span class="sig-paren">(</span><span class="sig-paren">)</span></dt>
<dd><p><code class="xref py py-obj docutils literal"><span class="pre">True</span></code> iff validation should be performed when manipulating a
binding instance.</p>
<p>This includes parsing a document or DOM tree, using a binding instance
class constructor, or assigning to an element or attribute field of a
binding instance.</p>
</dd></dl>
<dl class="method">
<dt>
<code class="descname">_getForDocument</code><span class="sig-paren">(</span><span class="sig-paren">)</span></dt>
<dd><p><code class="xref py py-obj docutils literal"><span class="pre">True</span></code> iff validation should be performed when creating a document
from a binding instance.</p>
<p>This applies at invocation of
<a class="reference internal" href="pyxb.binding.html#pyxb.binding.basis._TypeBinding_mixin.toDOM" title="pyxb.binding.basis._TypeBinding_mixin.toDOM"><code class="xref py py-obj docutils literal"><span class="pre">toDOM()</span></code></a>.
<a class="reference internal" href="pyxb.binding.html#pyxb.binding.basis._TypeBinding_mixin.toDOM" title="pyxb.binding.basis._TypeBinding_mixin.toDOM"><code class="xref py py-obj docutils literal"><span class="pre">toxml()</span></code></a> invokes <code class="xref py py-obj docutils literal"><span class="pre">toDOM()</span></code>.</p>
</dd></dl>
<dl class="method">
<dt>
<code class="descname">_setContentInfluencesGeneration</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span></dt>
<dd><p>Set the value of <a class="reference internal" href="#pyxb.ValidationConfig.contentInfluencesGeneration" title="pyxb.ValidationConfig.contentInfluencesGeneration"><code class="xref py py-obj docutils literal"><span class="pre">contentInfluencesGeneration</span></code></a>.</p>
</dd></dl>
<dl class="method">
<dt>
<code class="descname">_setForBinding</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span></dt>
<dd><p>Configure whether validation should be performed when manipulating
a binding instance.</p>
</dd></dl>
<dl class="method">
<dt>
<code class="descname">_setForDocument</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span></dt>
<dd><p>Configure whether validation should be performed when generating
a document from a binding instance.</p>
</dd></dl>
<dl class="method">
<dt>
<code class="descname">_setInvalidElementInContent</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span></dt>
<dd><p>Set the value of <a class="reference internal" href="#pyxb.ValidationConfig.invalidElementInContent" title="pyxb.ValidationConfig.invalidElementInContent"><code class="xref py py-obj docutils literal"><span class="pre">invalidElementInContent</span></code></a>.</p>
</dd></dl>
<dl class="method">
<dt>
<code class="descname">_setOrphanElementInContent</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span></dt>
<dd><p>Set the value of <a class="reference internal" href="#pyxb.ValidationConfig.orphanElementInContent" title="pyxb.ValidationConfig.orphanElementInContent"><code class="xref py py-obj docutils literal"><span class="pre">orphanElementInContent</span></code></a>.</p>
</dd></dl>
<dl class="attribute">
<dt>
<code class="descname">contentInfluencesGeneration</code></dt>
<dd><p>Determine whether complex type content influences element order in
document generation.</p>
<p>The value is one of <a class="reference internal" href="#pyxb.ValidationConfig.ALWAYS" title="pyxb.ValidationConfig.ALWAYS"><code class="xref py py-obj docutils literal"><span class="pre">ALWAYS</span></code></a>, <a class="reference internal" href="#pyxb.ValidationConfig.NEVER" title="pyxb.ValidationConfig.NEVER"><code class="xref py py-obj docutils literal"><span class="pre">NEVER</span></code></a>, <a class="reference internal" href="#pyxb.ValidationConfig.MIXED_ONLY" title="pyxb.ValidationConfig.MIXED_ONLY"><code class="xref py py-obj docutils literal"><span class="pre">MIXED_ONLY</span></code></a> (default).</p>
</dd></dl>
<dl class="method">
<dt>
<code class="descname">copy</code><span class="sig-paren">(</span><span class="sig-paren">)</span></dt>
<dd><p>Make a copy of this instance.</p>
<p>Use this to get a starting point when you need to customize validation
on a per-instance/per-class basis.</p>
</dd></dl>
<dl class="attribute">
<dt>
<code class="descname">forBinding</code></dt>
<dd><p><code class="xref py py-obj docutils literal"><span class="pre">True</span></code> iff validation should be performed when manipulating a
binding instance.</p>
<p>This includes parsing a document or DOM tree, using a binding instance
class constructor, or assigning to an element or attribute field of a
binding instance.</p>
</dd></dl>
<dl class="attribute">
<dt>
<code class="descname">forDocument</code></dt>
<dd><p><code class="xref py py-obj docutils literal"><span class="pre">True</span></code> iff validation should be performed when creating a document
from a binding instance.</p>
<p>This applies at invocation of
<a class="reference internal" href="pyxb.binding.html#pyxb.binding.basis._TypeBinding_mixin.toDOM" title="pyxb.binding.basis._TypeBinding_mixin.toDOM"><code class="xref py py-obj docutils literal"><span class="pre">toDOM()</span></code></a>.
<a class="reference internal" href="pyxb.binding.html#pyxb.binding.basis._TypeBinding_mixin.toDOM" title="pyxb.binding.basis._TypeBinding_mixin.toDOM"><code class="xref py py-obj docutils literal"><span class="pre">toxml()</span></code></a> invokes <code class="xref py py-obj docutils literal"><span class="pre">toDOM()</span></code>.</p>
</dd></dl>
<dl class="attribute">
<dt>
<code class="descname">invalidElementInContent</code></dt>
<dd><p>How to handle invalid elements in content lists.</p>
<p>The value is one of <a class="reference internal" href="#pyxb.ValidationConfig.IGNORE_ONCE" title="pyxb.ValidationConfig.IGNORE_ONCE"><code class="xref py py-obj docutils literal"><span class="pre">IGNORE_ONCE</span></code></a> (default), <a class="reference internal" href="#pyxb.ValidationConfig.GIVE_UP" title="pyxb.ValidationConfig.GIVE_UP"><code class="xref py py-obj docutils literal"><span class="pre">GIVE_UP</span></code></a>,
<a class="reference internal" href="#pyxb.ValidationConfig.RAISE_EXCEPTION" title="pyxb.ValidationConfig.RAISE_EXCEPTION"><code class="xref py py-obj docutils literal"><span class="pre">RAISE_EXCEPTION</span></code></a>.</p>
</dd></dl>
<dl class="attribute">
<dt>
<code class="descname">orphanElementInContent</code></dt>
<dd><p>How to handle unrecognized elements in content lists.</p>
<p>This is used when consulting a complex type instance content list to
influence the generation of documents from a binding instance.</p>
<p>The value is one of <a class="reference internal" href="#pyxb.ValidationConfig.IGNORE_ONCE" title="pyxb.ValidationConfig.IGNORE_ONCE"><code class="xref py py-obj docutils literal"><span class="pre">IGNORE_ONCE</span></code></a> (default), <a class="reference internal" href="#pyxb.ValidationConfig.GIVE_UP" title="pyxb.ValidationConfig.GIVE_UP"><code class="xref py py-obj docutils literal"><span class="pre">GIVE_UP</span></code></a>,
<a class="reference internal" href="#pyxb.ValidationConfig.RAISE_EXCEPTION" title="pyxb.ValidationConfig.RAISE_EXCEPTION"><code class="xref py py-obj docutils literal"><span class="pre">RAISE_EXCEPTION</span></code></a>.</p>
</dd></dl>
</dd></dl>
<dl class="data">
<dt>
<code class="descclassname">pyxb.</code><code class="descname">XMLStyle_minidom</code><em class="property"> = 0</em></dt>
<dd><p>Use xml.dom.minidom for XML processing. This is the fastest, but does not
provide location information. It produces DOM instances.</p>
</dd></dl>
<dl class="data">
<dt>
<code class="descclassname">pyxb.</code><code class="descname">XMLStyle_saxdom</code><em class="property"> = 1</em></dt>
<dd><p>Use pyxb.utils.saxdom for XML processing. This is the slowest, but both
provides location information and generates a DOM instance.</p>
</dd></dl>
<dl class="data">
<dt>
<code class="descclassname">pyxb.</code><code class="descname">XMLStyle_saxer</code><em class="property"> = 2</em></dt>
<dd><p>Use pyxb.binding.saxer when converting documents to binding instances.
This style supports location information in the bindings. It produces binding
instances directly, without going through a DOM stage, so is faster than
XMLStyle_saxdom. However, since the pyxb.xmlschema.structures classes require
a DOM model, XMLStyle_saxdom will be used for pyxb.utils.domutils.StringToDOM
if this style is selected.</p>
</dd></dl>
<dl class="function">
<dt>
<code class="descclassname">pyxb.</code><code class="descname">_SetXMLStyle</code><span class="sig-paren">(</span><em>style=None</em><span class="sig-paren">)</span></dt>
<dd><p>Set the interface used to parse XML content.</p>
<p>This can be invoked within code. The system default of <a class="reference internal" href="#pyxb.XMLStyle_saxer" title="pyxb.XMLStyle_saxer"><code class="xref py py-obj docutils literal"><span class="pre">XMLStyle_saxer</span></code></a>
can also be overridden at runtime by setting the environment variable
<code class="xref py py-obj docutils literal"><span class="pre">PYXB_XML_STYLE</span></code> to one of <code class="xref py py-obj docutils literal"><span class="pre">minidom</span></code>, <code class="xref py py-obj docutils literal"><span class="pre">saxdom</span></code>, or <code class="xref py py-obj docutils literal"><span class="pre">saxer</span></code>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>style</strong> – One of <a class="reference internal" href="#pyxb.XMLStyle_minidom" title="pyxb.XMLStyle_minidom"><code class="xref py py-obj docutils literal"><span class="pre">XMLStyle_minidom</span></code></a>, <a class="reference internal" href="#pyxb.XMLStyle_saxdom" title="pyxb.XMLStyle_saxdom"><code class="xref py py-obj docutils literal"><span class="pre">XMLStyle_saxdom</span></code></a>,</td>
</tr>
</tbody>
</table>
<p><a class="reference internal" href="#pyxb.XMLStyle_saxer" title="pyxb.XMLStyle_saxer"><code class="xref py py-obj docutils literal"><span class="pre">XMLStyle_saxer</span></code></a>. If not provided, the system default is used.</p>
</dd></dl>
<dl class="class">
<dt>
<em class="property">class </em><code class="descclassname">pyxb.</code><code class="descname">cscRoot</code><span class="sig-paren">(</span><em>*args</em>, <em>**kw</em><span class="sig-paren">)</span></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">object</span></code></p>
<p>This little bundle of joy exists because in Python 2.6 it
became an error to invoke <code class="xref py py-obj docutils literal"><span class="pre">object.__init__</span></code> with parameters (unless
you also override <code class="xref py py-obj docutils literal"><span class="pre">__new__</span></code>, in which case it’s only a warning.
Whatever.). Since I’m bloody not going to check in every class
whether <code class="xref py py-obj docutils literal"><span class="pre">super(Myclass,self)</span></code> refers to <code class="xref py py-obj docutils literal"><span class="pre">object</span></code> (even if I could
figure out how to do that, ‘cuz the obvious solutions don’t work),
we’ll just make this thing the root of all U{cooperative super
calling<<a class="reference external" href="http://www.geocities.com/foetsch/python/new_style_classes.htm#super">http://www.geocities.com/foetsch/python/new_style_classes.htm#super</a>>}
hierarchies. The standard syntax in PyXB for this pattern is:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="k">def</span> <span class="nf">method_csc</span> <span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kw</span><span class="p">):</span>
<span class="n">self_fn</span> <span class="o">=</span> <span class="k">lambda</span> <span class="o">*</span><span class="n">_args</span><span class="p">,</span> <span class="o">**</span><span class="n">_kw</span><span class="p">:</span> <span class="bp">self</span>
<span class="n">super_fn</span> <span class="o">=</span> <span class="nb">getattr</span><span class="p">(</span><span class="nb">super</span><span class="p">(</span><span class="n">ThisClass</span><span class="p">,</span> <span class="bp">self</span><span class="p">),</span> <span class="s1">'method_csc'</span><span class="p">,</span> <span class="n">self_fn</span><span class="p">)</span>
<span class="k">return</span> <span class="n">super_fn</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kw</span><span class="p">)</span>
</pre></div>
</div>
</dd></dl>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h3><a href="index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">pyxb package</a><ul>
<li><a class="reference internal" href="#subpackages">subpackages</a></li>
<li><a class="reference internal" href="#submodules">Submodules</a></li>
<li><a class="reference internal" href="#module-pyxb.exceptions_">pyxb.exceptions_ module</a></li>
<li><a class="reference internal" href="#module-pyxb">Module contents</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="pyxbgen_cli.html"
title="previous chapter"><code class="docutils literal"><span class="pre">pyxbgen</span></code> Command Line Options</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="pyxb.binding.html"
title="next chapter">pyxb.binding package</a></p>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/pyxb.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<div><input type="text" name="q" /></div>
<div><input type="submit" value="Go" /></div>
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="pyxb.binding.html" title="pyxb.binding package"
>next</a> |</li>
<li class="right" >
<a href="pyxbgen_cli.html" title="pyxbgen Command Line Options"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">PyXB 1.2.6 documentation</a> »</li>
<li style="margin-left: 20px">PyXB hosted on <a href="http://sourceforge.net/projects/pyxb"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=263147&type=9"
width="80" height="15" alt="Get PyXB: Python XML Schema Bindings at SourceForge.net. Fast, secure and Free Open Source software downloads"/></a></li>
</ul>
</div>
<div class="footer" role="contentinfo">
© Copyright 2009-2017, Peter A. Bigot.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.5.5.
</div>
</body>
</html>
|