1234 {any attributes with non-schema namespace . . .}> |
1243 {any attributes with non-schema namespace . . .}> |
1235 Content: (annotation?, simpleType?) |
1244 Content: (annotation?, simpleType?) |
1236 </attribute>""", |
1245 </attribute>""", |
1237 "type": SYNTAXELEMENT, |
1246 "type": SYNTAXELEMENT, |
1238 "extract": { |
1247 "extract": { |
1239 "default": GenerateElement("attribute", |
1248 "default": GenerateElement( |
|
1249 "attribute", |
1240 ["default", "fixed", "form", "id", "name", "ref", "type", "use"], |
1250 ["default", "fixed", "form", "id", "name", "ref", "type", "use"], |
1241 re.compile("((?:annotation )?(?:simpleType )?)")), |
1251 re.compile("((?:annotation )?(?:simpleType )?)")), |
1242 "schema": GenerateElement("attribute", |
1252 "schema": GenerateElement( |
|
1253 "attribute", |
1243 ["default", "fixed", "form", "id", "name", "type"], |
1254 ["default", "fixed", "form", "id", "name", "type"], |
1244 re.compile("((?:annotation )?(?:simpleType )?)")) |
1255 re.compile("((?:annotation )?(?:simpleType )?)")) |
1245 }, |
1256 }, |
1246 "reduce": ReduceAttribute |
1257 "reduce": ReduceAttribute |
1247 }, |
1258 }, |
1248 |
1259 |
1249 "attributeGroup": {"struct": """ |
1260 "attributeGroup": { |
|
1261 "struct": """ |
1250 <attributeGroup |
1262 <attributeGroup |
1251 id = ID |
1263 id = ID |
1252 name = NCName |
1264 name = NCName |
1253 ref = QName |
1265 ref = QName |
1254 {any attributes with non-schema namespace . . .}> |
1266 {any attributes with non-schema namespace . . .}> |
1255 Content: (annotation?, ((attribute | attributeGroup)*, anyAttribute?)) |
1267 Content: (annotation?, ((attribute | attributeGroup)*, anyAttribute?)) |
1256 </attributeGroup>""", |
1268 </attributeGroup>""", |
1257 "type": SYNTAXELEMENT, |
1269 "type": SYNTAXELEMENT, |
1258 "extract": { |
1270 "extract": { |
1259 "default": GenerateElement("attributeGroup", |
1271 "default": GenerateElement( |
|
1272 "attributeGroup", |
1260 ["id", "ref"], ONLY_ANNOTATION), |
1273 ["id", "ref"], ONLY_ANNOTATION), |
1261 "schema": GenerateElement("attributeGroup", |
1274 "schema": GenerateElement( |
|
1275 "attributeGroup", |
1262 ["id", "name"], |
1276 ["id", "name"], |
1263 re.compile("((?:annotation )?(?:(?:attribute |attributeGroup )*(?:anyAttribute )?))")) |
1277 re.compile("((?:annotation )?(?:(?:attribute |attributeGroup )*(?:anyAttribute )?))")) |
1264 }, |
1278 }, |
1265 "reduce": ReduceAttributeGroup |
1279 "reduce": ReduceAttributeGroup |
1266 }, |
1280 }, |
1267 |
1281 |
1268 "choice": {"struct": """ |
1282 "choice": { |
|
1283 "struct": """ |
1269 <choice |
1284 <choice |
1270 id = ID |
1285 id = ID |
1271 maxOccurs = (nonNegativeInteger | unbounded) : 1 |
1286 maxOccurs = (nonNegativeInteger | unbounded) : 1 |
1272 minOccurs = nonNegativeInteger : 1 |
1287 minOccurs = nonNegativeInteger : 1 |
1273 {any attributes with non-schema namespace . . .}> |
1288 {any attributes with non-schema namespace . . .}> |
1274 Content: (annotation?, (element | group | choice | sequence | any)*) |
1289 Content: (annotation?, (element | group | choice | sequence | any)*) |
1275 </choice>""", |
1290 </choice>""", |
1276 "type": SYNTAXELEMENT, |
1291 "type": SYNTAXELEMENT, |
1277 "extract": { |
1292 "extract": { |
1278 "default": GenerateElement("choice", ["id", "maxOccurs", "minOccurs"], |
1293 "default": GenerateElement( |
|
1294 "choice", |
|
1295 ["id", "maxOccurs", "minOccurs"], |
1279 re.compile("((?:annotation )?(?:element |group |choice |sequence |any )*)")) |
1296 re.compile("((?:annotation )?(?:element |group |choice |sequence |any )*)")) |
1280 }, |
1297 }, |
1281 "reduce": ReduceChoice |
1298 "reduce": ReduceChoice |
1282 }, |
1299 }, |
1283 |
1300 |
1284 "complexContent": {"struct": """ |
1301 "complexContent": { |
|
1302 "struct": """ |
1285 <complexContent |
1303 <complexContent |
1286 id = ID |
1304 id = ID |
1287 mixed = boolean |
1305 mixed = boolean |
1288 {any attributes with non-schema namespace . . .}> |
1306 {any attributes with non-schema namespace . . .}> |
1289 Content: (annotation?, (restriction | extension)) |
1307 Content: (annotation?, (restriction | extension)) |
1290 </complexContent>""", |
1308 </complexContent>""", |
1291 "type": SYNTAXELEMENT, |
1309 "type": SYNTAXELEMENT, |
1292 "extract": { |
1310 "extract": { |
1293 "default": GenerateElement("complexContent", ["id", "mixed"], |
1311 "default": GenerateElement( |
|
1312 "complexContent", |
|
1313 ["id", "mixed"], |
1294 re.compile("((?:annotation )?(?:restriction |extension ))")) |
1314 re.compile("((?:annotation )?(?:restriction |extension ))")) |
1295 }, |
1315 }, |
1296 "reduce": ReduceComplexContent |
1316 "reduce": ReduceComplexContent |
1297 }, |
1317 }, |
1298 |
1318 |
1299 "complexType": {"struct": """ |
1319 "complexType": { |
|
1320 "struct": """ |
1300 <complexType |
1321 <complexType |
1301 abstract = boolean : false |
1322 abstract = boolean : false |
1302 block = (#all | List of (extension | restriction)) |
1323 block = (#all | List of (extension | restriction)) |
1303 final = (#all | List of (extension | restriction)) |
1324 final = (#all | List of (extension | restriction)) |
1304 id = ID |
1325 id = ID |
1350 {any attributes with non-schema namespace . . .}> |
1376 {any attributes with non-schema namespace . . .}> |
1351 Content: (annotation?, ((simpleType | complexType)?, (unique | key | keyref)*)) |
1377 Content: (annotation?, ((simpleType | complexType)?, (unique | key | keyref)*)) |
1352 </element>""", |
1378 </element>""", |
1353 "type": SYNTAXELEMENT, |
1379 "type": SYNTAXELEMENT, |
1354 "extract": { |
1380 "extract": { |
1355 "default": GenerateElement("element", |
1381 "default": GenerateElement( |
|
1382 "element", |
1356 ["abstract", "block", "default", "final", "fixed", "form", "id", "maxOccurs", "minOccurs", "name", "nillable", "ref", "substitutionGroup", "type"], |
1383 ["abstract", "block", "default", "final", "fixed", "form", "id", "maxOccurs", "minOccurs", "name", "nillable", "ref", "substitutionGroup", "type"], |
1357 re.compile("((?:annotation )?(?:simpleType |complexType )?(?:unique |key |keyref )*)")), |
1384 re.compile("((?:annotation )?(?:simpleType |complexType )?(?:unique |key |keyref )*)")), |
1358 "schema": GenerateElement("element", |
1385 "schema": GenerateElement( |
|
1386 "element", |
1359 ["abstract", "block", "default", "final", "fixed", "form", "id", "name", "nillable", "substitutionGroup", "type"], |
1387 ["abstract", "block", "default", "final", "fixed", "form", "id", "name", "nillable", "substitutionGroup", "type"], |
1360 re.compile("((?:annotation )?(?:simpleType |complexType )?(?:unique |key |keyref )*)")) |
1388 re.compile("((?:annotation )?(?:simpleType |complexType )?(?:unique |key |keyref )*)")) |
1361 }, |
1389 }, |
1362 "reduce": ReduceElement |
1390 "reduce": ReduceElement |
1363 }, |
1391 }, |
1364 |
1392 |
1365 "enumeration": {"struct": """ |
1393 "enumeration": { |
|
1394 "struct": """ |
1366 <enumeration |
1395 <enumeration |
1367 id = ID |
1396 id = ID |
1368 value = anySimpleType |
1397 value = anySimpleType |
1369 {any attributes with non-schema namespace . . .}> |
1398 {any attributes with non-schema namespace . . .}> |
1370 Content: (annotation?) |
1399 Content: (annotation?) |
1433 {any attributes with non-schema namespace . . .}> |
1472 {any attributes with non-schema namespace . . .}> |
1434 Content: (annotation?, (all | choice | sequence)?) |
1473 Content: (annotation?, (all | choice | sequence)?) |
1435 </group>""", |
1474 </group>""", |
1436 "type": SYNTAXELEMENT, |
1475 "type": SYNTAXELEMENT, |
1437 "extract": { |
1476 "extract": { |
1438 "default": GenerateElement("group", |
1477 "default": GenerateElement( |
|
1478 "group", |
1439 ["id", "maxOccurs", "minOccurs", "ref"], |
1479 ["id", "maxOccurs", "minOccurs", "ref"], |
1440 re.compile("((?:annotation )?(?:all |choice |sequence )?)")), |
1480 re.compile("((?:annotation )?(?:all |choice |sequence )?)")), |
1441 "schema": GenerateElement("group", |
1481 "schema": GenerateElement( |
|
1482 "group", |
1442 ["id", "name"], |
1483 ["id", "name"], |
1443 re.compile("((?:annotation )?(?:all |choice |sequence )?)")) |
1484 re.compile("((?:annotation )?(?:all |choice |sequence )?)")) |
1444 }, |
1485 }, |
1445 "reduce": ReduceGroup |
1486 "reduce": ReduceGroup |
1446 }, |
1487 }, |
1447 |
1488 |
1448 "import": {"struct": """ |
1489 "import": { |
|
1490 "struct": """ |
1449 <import |
1491 <import |
1450 id = ID |
1492 id = ID |
1451 namespace = anyURI |
1493 namespace = anyURI |
1452 schemaLocation = anyURI |
1494 schemaLocation = anyURI |
1453 {any attributes with non-schema namespace . . .}> |
1495 {any attributes with non-schema namespace . . .}> |
1454 Content: (annotation?) |
1496 Content: (annotation?) |
1455 </import>""", |
1497 </import>""", |
1456 "type": SYNTAXELEMENT, |
1498 "type": SYNTAXELEMENT, |
1457 "extract": { |
1499 "extract": { |
1458 "default": GenerateElement("import", |
1500 "default": GenerateElement( |
1459 ["id", "namespace", "schemaLocation"], ONLY_ANNOTATION) |
1501 "import", |
|
1502 ["id", "namespace", "schemaLocation"], |
|
1503 ONLY_ANNOTATION) |
1460 }, |
1504 }, |
1461 "reduce": ReduceImport |
1505 "reduce": ReduceImport |
1462 }, |
1506 }, |
1463 |
1507 |
1464 "include": {"struct": """ |
1508 "include": { |
|
1509 "struct": """ |
1465 <include |
1510 <include |
1466 id = ID |
1511 id = ID |
1467 schemaLocation = anyURI |
1512 schemaLocation = anyURI |
1468 {any attributes with non-schema namespace . . .}> |
1513 {any attributes with non-schema namespace . . .}> |
1469 Content: (annotation?) |
1514 Content: (annotation?) |
1470 </include>""", |
1515 </include>""", |
1471 "type": SYNTAXELEMENT, |
1516 "type": SYNTAXELEMENT, |
1472 "extract": { |
1517 "extract": { |
1473 "default": GenerateElement("include", |
1518 "default": GenerateElement( |
1474 ["id", "schemaLocation"], ONLY_ANNOTATION) |
1519 "include", |
|
1520 ["id", "schemaLocation"], |
|
1521 ONLY_ANNOTATION) |
1475 }, |
1522 }, |
1476 "reduce": ReduceInclude |
1523 "reduce": ReduceInclude |
1477 }, |
1524 }, |
1478 |
1525 |
1479 "key": {"struct": """ |
1526 "key": { |
|
1527 "struct": """ |
1480 <key |
1528 <key |
1481 id = ID |
1529 id = ID |
1482 name = NCName |
1530 name = NCName |
1483 {any attributes with non-schema namespace . . .}> |
1531 {any attributes with non-schema namespace . . .}> |
1484 Content: (annotation?, (selector, field+)) |
1532 Content: (annotation?, (selector, field+)) |
1485 </key>""", |
1533 </key>""", |
1486 "type": SYNTAXELEMENT, |
1534 "type": SYNTAXELEMENT, |
1487 "extract": { |
1535 "extract": { |
1488 "default": GenerateElement("key", ["id", "name"], |
1536 "default": GenerateElement( |
|
1537 "key", ["id", "name"], |
1489 re.compile("((?:annotation )?(?:selector (?:field )+))")) |
1538 re.compile("((?:annotation )?(?:selector (?:field )+))")) |
1490 }, |
1539 }, |
1491 "reduce": ReduceKey |
1540 "reduce": ReduceKey |
1492 }, |
1541 }, |
1493 |
1542 |
1494 "keyref": {"struct": """ |
1543 "keyref": { |
|
1544 "struct": """ |
1495 <keyref |
1545 <keyref |
1496 id = ID |
1546 id = ID |
1497 name = NCName |
1547 name = NCName |
1498 refer = QName |
1548 refer = QName |
1499 {any attributes with non-schema namespace . . .}> |
1549 {any attributes with non-schema namespace . . .}> |
1500 Content: (annotation?, (selector, field+)) |
1550 Content: (annotation?, (selector, field+)) |
1501 </keyref>""", |
1551 </keyref>""", |
1502 "type": SYNTAXELEMENT, |
1552 "type": SYNTAXELEMENT, |
1503 "extract": { |
1553 "extract": { |
1504 "default": GenerateElement("keyref", ["id", "name", "refer"], |
1554 "default": GenerateElement( |
|
1555 "keyref", ["id", "name", "refer"], |
1505 re.compile("((?:annotation )?(?:selector (?:field )+))")) |
1556 re.compile("((?:annotation )?(?:selector (?:field )+))")) |
1506 }, |
1557 }, |
1507 "reduce": ReduceKeyRef |
1558 "reduce": ReduceKeyRef |
1508 }, |
1559 }, |
1509 |
1560 |
1510 "length": {"struct": """ |
1561 "length": { |
|
1562 "struct": """ |
1511 <length |
1563 <length |
1512 fixed = boolean : false |
1564 fixed = boolean : false |
1513 id = ID |
1565 id = ID |
1514 value = nonNegativeInteger |
1566 value = nonNegativeInteger |
1515 {any attributes with non-schema namespace . . .}> |
1567 {any attributes with non-schema namespace . . .}> |
1516 Content: (annotation?) |
1568 Content: (annotation?) |
1517 </length>""", |
1569 </length>""", |
1518 "type": SYNTAXELEMENT, |
1570 "type": SYNTAXELEMENT, |
1519 "extract": { |
1571 "extract": { |
1520 "default": GenerateElement("length", |
1572 "default": GenerateElement( |
1521 ["fixed", "id", "value"], ONLY_ANNOTATION) |
1573 "length", ["fixed", "id", "value"], ONLY_ANNOTATION) |
1522 }, |
1574 }, |
1523 "reduce": GenerateFacetReducing("length", True) |
1575 "reduce": GenerateFacetReducing("length", True) |
1524 }, |
1576 }, |
1525 |
1577 |
1526 "list": {"struct": """ |
1578 "list": { |
|
1579 "struct": """ |
1527 <list |
1580 <list |
1528 id = ID |
1581 id = ID |
1529 itemType = QName |
1582 itemType = QName |
1530 {any attributes with non-schema namespace . . .}> |
1583 {any attributes with non-schema namespace . . .}> |
1531 Content: (annotation?, simpleType?) |
1584 Content: (annotation?, simpleType?) |
1532 </list>""", |
1585 </list>""", |
1533 "type": SYNTAXELEMENT, |
1586 "type": SYNTAXELEMENT, |
1534 "extract": { |
1587 "extract": { |
1535 "default": GenerateElement("list", ["id", "itemType"], |
1588 "default": GenerateElement( |
|
1589 "list", ["id", "itemType"], |
1536 re.compile("((?:annotation )?(?:simpleType )?)$")) |
1590 re.compile("((?:annotation )?(?:simpleType )?)$")) |
1537 }, |
1591 }, |
1538 "reduce": ReduceList |
1592 "reduce": ReduceList |
1539 }, |
1593 }, |
1540 |
1594 |
1541 "maxExclusive": {"struct": """ |
1595 "maxExclusive": { |
|
1596 "struct": """ |
1542 <maxInclusive |
1597 <maxInclusive |
1543 fixed = boolean : false |
1598 fixed = boolean : false |
1544 id = ID |
1599 id = ID |
1545 value = anySimpleType |
1600 value = anySimpleType |
1546 {any attributes with non-schema namespace . . .}> |
1601 {any attributes with non-schema namespace . . .}> |
1547 Content: (annotation?) |
1602 Content: (annotation?) |
1548 </maxInclusive>""", |
1603 </maxInclusive>""", |
1549 "type": SYNTAXELEMENT, |
1604 "type": SYNTAXELEMENT, |
1550 "extract": { |
1605 "extract": { |
1551 "default": GenerateElement("maxExclusive", |
1606 "default": GenerateElement( |
1552 ["fixed", "id", "value"], ONLY_ANNOTATION) |
1607 "maxExclusive", ["fixed", "id", "value"], ONLY_ANNOTATION) |
1553 }, |
1608 }, |
1554 "reduce": GenerateFacetReducing("maxExclusive", True) |
1609 "reduce": GenerateFacetReducing("maxExclusive", True) |
1555 }, |
1610 }, |
1556 |
1611 |
1557 "maxInclusive": {"struct": """ |
1612 "maxInclusive": { |
|
1613 "struct": """ |
1558 <maxExclusive |
1614 <maxExclusive |
1559 fixed = boolean : false |
1615 fixed = boolean : false |
1560 id = ID |
1616 id = ID |
1561 value = anySimpleType |
1617 value = anySimpleType |
1562 {any attributes with non-schema namespace . . .}> |
1618 {any attributes with non-schema namespace . . .}> |
1563 Content: (annotation?) |
1619 Content: (annotation?) |
1564 </maxExclusive>""", |
1620 </maxExclusive>""", |
1565 "type": SYNTAXELEMENT, |
1621 "type": SYNTAXELEMENT, |
1566 "extract": { |
1622 "extract": { |
1567 "default": GenerateElement("maxInclusive", |
1623 "default": GenerateElement( |
1568 ["fixed", "id", "value"], ONLY_ANNOTATION) |
1624 "maxInclusive", ["fixed", "id", "value"], ONLY_ANNOTATION) |
1569 }, |
1625 }, |
1570 "reduce": GenerateFacetReducing("maxInclusive", True) |
1626 "reduce": GenerateFacetReducing("maxInclusive", True) |
1571 }, |
1627 }, |
1572 |
1628 |
1573 "maxLength": {"struct": """ |
1629 "maxLength": { |
|
1630 "struct": """ |
1574 <maxLength |
1631 <maxLength |
1575 fixed = boolean : false |
1632 fixed = boolean : false |
1576 id = ID |
1633 id = ID |
1577 value = nonNegativeInteger |
1634 value = nonNegativeInteger |
1578 {any attributes with non-schema namespace . . .}> |
1635 {any attributes with non-schema namespace . . .}> |
1579 Content: (annotation?) |
1636 Content: (annotation?) |
1580 </maxLength>""", |
1637 </maxLength>""", |
1581 "type": SYNTAXELEMENT, |
1638 "type": SYNTAXELEMENT, |
1582 "extract": { |
1639 "extract": { |
1583 "default": GenerateElement("maxLength", |
1640 "default": GenerateElement( |
1584 ["fixed", "id", "value"], ONLY_ANNOTATION) |
1641 "maxLength", ["fixed", "id", "value"], ONLY_ANNOTATION) |
1585 }, |
1642 }, |
1586 "reduce": GenerateFacetReducing("maxLength", True) |
1643 "reduce": GenerateFacetReducing("maxLength", True) |
1587 }, |
1644 }, |
1588 |
1645 |
1589 "minExclusive": {"struct": """ |
1646 "minExclusive": { |
|
1647 "struct": """ |
1590 <minExclusive |
1648 <minExclusive |
1591 fixed = boolean : false |
1649 fixed = boolean : false |
1592 id = ID |
1650 id = ID |
1593 value = anySimpleType |
1651 value = anySimpleType |
1594 {any attributes with non-schema namespace . . .}> |
1652 {any attributes with non-schema namespace . . .}> |
1595 Content: (annotation?) |
1653 Content: (annotation?) |
1596 </minExclusive>""", |
1654 </minExclusive>""", |
1597 "type": SYNTAXELEMENT, |
1655 "type": SYNTAXELEMENT, |
1598 "extract": { |
1656 "extract": { |
1599 "default": GenerateElement("minExclusive", |
1657 "default": GenerateElement( |
1600 ["fixed", "id", "value"], ONLY_ANNOTATION) |
1658 "minExclusive", ["fixed", "id", "value"], ONLY_ANNOTATION) |
1601 }, |
1659 }, |
1602 "reduce": GenerateFacetReducing("minExclusive", True) |
1660 "reduce": GenerateFacetReducing("minExclusive", True) |
1603 }, |
1661 }, |
1604 |
1662 |
1605 "minInclusive": {"struct": """ |
1663 "minInclusive": { |
|
1664 "struct": """ |
1606 <minInclusive |
1665 <minInclusive |
1607 fixed = boolean : false |
1666 fixed = boolean : false |
1608 id = ID |
1667 id = ID |
1609 value = anySimpleType |
1668 value = anySimpleType |
1610 {any attributes with non-schema namespace . . .}> |
1669 {any attributes with non-schema namespace . . .}> |
1611 Content: (annotation?) |
1670 Content: (annotation?) |
1612 </minInclusive>""", |
1671 </minInclusive>""", |
1613 "type": SYNTAXELEMENT, |
1672 "type": SYNTAXELEMENT, |
1614 "extract": { |
1673 "extract": { |
1615 "default": GenerateElement("minInclusive", |
1674 "default": GenerateElement( |
1616 ["fixed", "id", "value"], ONLY_ANNOTATION) |
1675 "minInclusive", ["fixed", "id", "value"], ONLY_ANNOTATION) |
1617 }, |
1676 }, |
1618 "reduce": GenerateFacetReducing("minInclusive", True) |
1677 "reduce": GenerateFacetReducing("minInclusive", True) |
1619 }, |
1678 }, |
1620 |
1679 |
1621 "minLength": {"struct": """ |
1680 "minLength": { |
|
1681 "struct": """ |
1622 <minLength |
1682 <minLength |
1623 fixed = boolean : false |
1683 fixed = boolean : false |
1624 id = ID |
1684 id = ID |
1625 value = nonNegativeInteger |
1685 value = nonNegativeInteger |
1626 {any attributes with non-schema namespace . . .}> |
1686 {any attributes with non-schema namespace . . .}> |
1627 Content: (annotation?) |
1687 Content: (annotation?) |
1628 </minLength>""", |
1688 </minLength>""", |
1629 "type": SYNTAXELEMENT, |
1689 "type": SYNTAXELEMENT, |
1630 "extract": { |
1690 "extract": { |
1631 "default": GenerateElement("minLength", |
1691 "default": GenerateElement( |
1632 ["fixed", "id", "value"], ONLY_ANNOTATION) |
1692 "minLength", ["fixed", "id", "value"], ONLY_ANNOTATION) |
1633 }, |
1693 }, |
1634 "reduce": GenerateFacetReducing("minLength", True) |
1694 "reduce": GenerateFacetReducing("minLength", True) |
1635 }, |
1695 }, |
1636 |
1696 |
1637 "pattern": {"struct": """ |
1697 "pattern": { |
|
1698 "struct": """ |
1638 <pattern |
1699 <pattern |
1639 id = ID |
1700 id = ID |
1640 value = string |
1701 value = string |
1641 {any attributes with non-schema namespace . . .}> |
1702 {any attributes with non-schema namespace . . .}> |
1642 Content: (annotation?) |
1703 Content: (annotation?) |
1646 "default": GenerateElement("pattern", ["id", "value"], ONLY_ANNOTATION) |
1707 "default": GenerateElement("pattern", ["id", "value"], ONLY_ANNOTATION) |
1647 }, |
1708 }, |
1648 "reduce": GenerateFacetReducing("pattern", False) |
1709 "reduce": GenerateFacetReducing("pattern", False) |
1649 }, |
1710 }, |
1650 |
1711 |
1651 "redefine": {"struct": """ |
1712 "redefine": { |
|
1713 "struct": """ |
1652 <redefine |
1714 <redefine |
1653 id = ID |
1715 id = ID |
1654 schemaLocation = anyURI |
1716 schemaLocation = anyURI |
1655 {any attributes with non-schema namespace . . .}> |
1717 {any attributes with non-schema namespace . . .}> |
1656 Content: (annotation | (simpleType | complexType | group | attributeGroup))* |
1718 Content: (annotation | (simpleType | complexType | group | attributeGroup))* |
1657 </redefine>""", |
1719 </redefine>""", |
1658 "type": SYNTAXELEMENT, |
1720 "type": SYNTAXELEMENT, |
1659 "extract": { |
1721 "extract": { |
1660 "default": GenerateElement("refine", ["id", "schemaLocation"], |
1722 "default": GenerateElement( |
|
1723 "refine", ["id", "schemaLocation"], |
1661 re.compile("((?:annotation |(?:simpleType |complexType |group |attributeGroup ))*)")) |
1724 re.compile("((?:annotation |(?:simpleType |complexType |group |attributeGroup ))*)")) |
1662 }, |
1725 }, |
1663 "reduce": ReduceRedefine |
1726 "reduce": ReduceRedefine |
1664 }, |
1727 }, |
1665 |
1728 |
1666 "restriction": {"struct": """ |
1729 "restriction": { |
|
1730 "struct": """ |
1667 <restriction |
1731 <restriction |
1668 base = QName |
1732 base = QName |
1669 id = ID |
1733 id = ID |
1670 {any attributes with non-schema namespace . . .}> |
1734 {any attributes with non-schema namespace . . .}> |
1671 Content: (annotation?, (group | all | choice | sequence)?, ((attribute | attributeGroup)*, anyAttribute?)) |
1735 Content: (annotation?, (group | all | choice | sequence)?, ((attribute | attributeGroup)*, anyAttribute?)) |
1672 </restriction>""", |
1736 </restriction>""", |
1673 "type": SYNTAXELEMENT, |
1737 "type": SYNTAXELEMENT, |
1674 "extract": { |
1738 "extract": { |
1675 "default": GenerateElement("restriction", ["base", "id"], |
1739 "default": GenerateElement( |
|
1740 "restriction", |
|
1741 ["base", "id"], |
1676 re.compile("((?:annotation )?(?:(?:simpleType )?(?:(?:minExclusive |minInclusive |maxExclusive |maxInclusive |totalDigits |fractionDigits |length |minLength |maxLength |enumeration |whiteSpace |pattern )*)))")), |
1742 re.compile("((?:annotation )?(?:(?:simpleType )?(?:(?:minExclusive |minInclusive |maxExclusive |maxInclusive |totalDigits |fractionDigits |length |minLength |maxLength |enumeration |whiteSpace |pattern )*)))")), |
1677 "simpleContent": GenerateElement("restriction", ["base", "id"], |
1743 "simpleContent": GenerateElement( |
|
1744 "restriction", |
|
1745 ["base", "id"], |
1678 re.compile("((?:annotation )?(?:(?:simpleType )?(?:(?:minExclusive |minInclusive |maxExclusive |maxInclusive |totalDigits |fractionDigits |length |minLength |maxLength |enumeration |whiteSpace |pattern )*)?(?:(?:attribute |attributeGroup )*(?:anyAttribute )?)))")), |
1746 re.compile("((?:annotation )?(?:(?:simpleType )?(?:(?:minExclusive |minInclusive |maxExclusive |maxInclusive |totalDigits |fractionDigits |length |minLength |maxLength |enumeration |whiteSpace |pattern )*)?(?:(?:attribute |attributeGroup )*(?:anyAttribute )?)))")), |
1679 "complexContent": GenerateElement("restriction", ["base", "id"], |
1747 "complexContent": GenerateElement( |
|
1748 "restriction", |
|
1749 ["base", "id"], |
1680 re.compile("((?:annotation )?(?:(?:simpleType )?(?:group |all |choice |sequence )?(?:(?:attribute |attributeGroup )*(?:anyAttribute )?)))")), |
1750 re.compile("((?:annotation )?(?:(?:simpleType )?(?:group |all |choice |sequence )?(?:(?:attribute |attributeGroup )*(?:anyAttribute )?)))")), |
1681 }, |
1751 }, |
1682 "reduce": ReduceRestriction |
1752 "reduce": ReduceRestriction |
1683 }, |
1753 }, |
1684 |
1754 |
1685 "schema": {"struct": """ |
1755 "schema": { |
|
1756 "struct": """ |
1686 <schema |
1757 <schema |
1687 attributeFormDefault = (qualified | unqualified) : unqualified |
1758 attributeFormDefault = (qualified | unqualified) : unqualified |
1688 blockDefault = (#all | List of (extension | restriction | substitution)) : '' |
1759 blockDefault = (#all | List of (extension | restriction | substitution)) : '' |
1689 elementFormDefault = (qualified | unqualified) : unqualified |
1760 elementFormDefault = (qualified | unqualified) : unqualified |
1690 finalDefault = (#all | List of (extension | restriction | list | union)) : '' |
1761 finalDefault = (#all | List of (extension | restriction | list | union)) : '' |
1715 "default": GenerateElement("selector", ["id", "xpath"], ONLY_ANNOTATION) |
1795 "default": GenerateElement("selector", ["id", "xpath"], ONLY_ANNOTATION) |
1716 }, |
1796 }, |
1717 "reduce": ReduceSelector |
1797 "reduce": ReduceSelector |
1718 }, |
1798 }, |
1719 |
1799 |
1720 "sequence": {"struct": """ |
1800 "sequence": { |
|
1801 "struct": """ |
1721 <sequence |
1802 <sequence |
1722 id = ID |
1803 id = ID |
1723 maxOccurs = (nonNegativeInteger | unbounded) : 1 |
1804 maxOccurs = (nonNegativeInteger | unbounded) : 1 |
1724 minOccurs = nonNegativeInteger : 1 |
1805 minOccurs = nonNegativeInteger : 1 |
1725 {any attributes with non-schema namespace . . .}> |
1806 {any attributes with non-schema namespace . . .}> |
1726 Content: (annotation?, (element | group | choice | sequence | any)*) |
1807 Content: (annotation?, (element | group | choice | sequence | any)*) |
1727 </sequence>""", |
1808 </sequence>""", |
1728 "type": SYNTAXELEMENT, |
1809 "type": SYNTAXELEMENT, |
1729 "extract": { |
1810 "extract": { |
1730 "default": GenerateElement("sequence", ["id", "maxOccurs", "minOccurs"], |
1811 "default": GenerateElement( |
|
1812 "sequence", ["id", "maxOccurs", "minOccurs"], |
1731 re.compile("((?:annotation )?(?:element |group |choice |sequence |any )*)")) |
1813 re.compile("((?:annotation )?(?:element |group |choice |sequence |any )*)")) |
1732 }, |
1814 }, |
1733 "reduce": ReduceSequence |
1815 "reduce": ReduceSequence |
1734 }, |
1816 }, |
1735 |
1817 |
1736 "simpleContent": {"struct": """ |
1818 "simpleContent": { |
|
1819 "struct": """ |
1737 <simpleContent |
1820 <simpleContent |
1738 id = ID |
1821 id = ID |
1739 {any attributes with non-schema namespace . . .}> |
1822 {any attributes with non-schema namespace . . .}> |
1740 Content: (annotation?, (restriction | extension)) |
1823 Content: (annotation?, (restriction | extension)) |
1741 </simpleContent>""", |
1824 </simpleContent>""", |
1742 "type": SYNTAXELEMENT, |
1825 "type": SYNTAXELEMENT, |
1743 "extract": { |
1826 "extract": { |
1744 "default": GenerateElement("simpleContent", ["id"], |
1827 "default": GenerateElement( |
|
1828 "simpleContent", ["id"], |
1745 re.compile("((?:annotation )?(?:restriction |extension ))")) |
1829 re.compile("((?:annotation )?(?:restriction |extension ))")) |
1746 }, |
1830 }, |
1747 "reduce": ReduceSimpleContent |
1831 "reduce": ReduceSimpleContent |
1748 }, |
1832 }, |
1749 |
1833 |
1750 "simpleType": {"struct": """ |
1834 "simpleType": { |
|
1835 "struct": """ |
1751 <simpleType |
1836 <simpleType |
1752 final = (#all | List of (list | union | restriction)) |
1837 final = (#all | List of (list | union | restriction)) |
1753 id = ID |
1838 id = ID |
1754 name = NCName |
1839 name = NCName |
1755 {any attributes with non-schema namespace . . .}> |
1840 {any attributes with non-schema namespace . . .}> |
1756 Content: (annotation?, (restriction | list | union)) |
1841 Content: (annotation?, (restriction | list | union)) |
1757 </simpleType>""", |
1842 </simpleType>""", |
1758 "type": SYNTAXELEMENT, |
1843 "type": SYNTAXELEMENT, |
1759 "extract": { |
1844 "extract": { |
1760 "default": GenerateElement("simpleType", ["final", "id", "name"], |
1845 "default": GenerateElement( |
|
1846 "simpleType", ["final", "id", "name"], |
1761 re.compile("((?:annotation )?(?:restriction |list |union ))")) |
1847 re.compile("((?:annotation )?(?:restriction |list |union ))")) |
1762 }, |
1848 }, |
1763 "reduce": ReduceSimpleType |
1849 "reduce": ReduceSimpleType |
1764 }, |
1850 }, |
1765 |
1851 |
1766 "totalDigits": {"struct": """ |
1852 "totalDigits": { |
|
1853 "struct": """ |
1767 <totalDigits |
1854 <totalDigits |
1768 fixed = boolean : false |
1855 fixed = boolean : false |
1769 id = ID |
1856 id = ID |
1770 value = positiveInteger |
1857 value = positiveInteger |
1771 {any attributes with non-schema namespace . . .}> |
1858 {any attributes with non-schema namespace . . .}> |
1772 Content: (annotation?) |
1859 Content: (annotation?) |
1773 </totalDigits>""", |
1860 </totalDigits>""", |
1774 "type": SYNTAXELEMENT, |
1861 "type": SYNTAXELEMENT, |
1775 "extract": { |
1862 "extract": { |
1776 "default": GenerateElement("totalDigits", |
1863 "default": GenerateElement( |
1777 ["fixed", "id", "value"], ONLY_ANNOTATION), |
1864 "totalDigits", ["fixed", "id", "value"], ONLY_ANNOTATION), |
1778 }, |
1865 }, |
1779 "reduce": GenerateFacetReducing("totalDigits", True) |
1866 "reduce": GenerateFacetReducing("totalDigits", True) |
1780 }, |
1867 }, |
1781 |
1868 |
1782 "union": {"struct": """ |
1869 "union": { |
|
1870 "struct": """ |
1783 <union |
1871 <union |
1784 id = ID |
1872 id = ID |
1785 memberTypes = List of QName |
1873 memberTypes = List of QName |
1786 {any attributes with non-schema namespace . . .}> |
1874 {any attributes with non-schema namespace . . .}> |
1787 Content: (annotation?, simpleType*) |
1875 Content: (annotation?, simpleType*) |
1788 </union>""", |
1876 </union>""", |
1789 "type": SYNTAXELEMENT, |
1877 "type": SYNTAXELEMENT, |
1790 "extract": { |
1878 "extract": { |
1791 "default": GenerateElement("union", ["id", "memberTypes"], |
1879 "default": GenerateElement( |
|
1880 "union", ["id", "memberTypes"], |
1792 re.compile("((?:annotation )?(?:simpleType )*)")) |
1881 re.compile("((?:annotation )?(?:simpleType )*)")) |
1793 }, |
1882 }, |
1794 "reduce": ReduceUnion |
1883 "reduce": ReduceUnion |
1795 }, |
1884 }, |
1796 |
1885 |
1797 "unique": {"struct": """ |
1886 "unique": { |
|
1887 "struct": """ |
1798 <unique |
1888 <unique |
1799 id = ID |
1889 id = ID |
1800 name = NCName |
1890 name = NCName |
1801 {any attributes with non-schema namespace . . .}> |
1891 {any attributes with non-schema namespace . . .}> |
1802 Content: (annotation?, (selector, field+)) |
1892 Content: (annotation?, (selector, field+)) |
1803 </unique>""", |
1893 </unique>""", |
1804 "type": SYNTAXELEMENT, |
1894 "type": SYNTAXELEMENT, |
1805 "extract": { |
1895 "extract": { |
1806 "default": GenerateElement("unique", ["id", "name"], |
1896 "default": GenerateElement( |
|
1897 "unique", ["id", "name"], |
1807 re.compile("((?:annotation )?(?:selector |(?:field )+))")) |
1898 re.compile("((?:annotation )?(?:selector |(?:field )+))")) |
1808 }, |
1899 }, |
1809 "reduce": ReduceUnique |
1900 "reduce": ReduceUnique |
1810 }, |
1901 }, |
1811 |
1902 |
1812 "whiteSpace": {"struct": """ |
1903 "whiteSpace": { |
|
1904 "struct": """ |
1813 <whiteSpace |
1905 <whiteSpace |
1814 fixed = boolean : false |
1906 fixed = boolean : false |
1815 id = ID |
1907 id = ID |
1816 value = (collapse | preserve | replace) |
1908 value = (collapse | preserve | replace) |
1817 {any attributes with non-schema namespace . . .}> |
1909 {any attributes with non-schema namespace . . .}> |
1818 Content: (annotation?) |
1910 Content: (annotation?) |
1819 </whiteSpace>""", |
1911 </whiteSpace>""", |
1820 "type": SYNTAXELEMENT, |
1912 "type": SYNTAXELEMENT, |
1821 "extract": { |
1913 "extract": { |
1822 "default": GenerateElement("whiteSpace", |
1914 "default": GenerateElement( |
1823 ["fixed", "id", "value"], ONLY_ANNOTATION) |
1915 "whiteSpace", ["fixed", "id", "value"], ONLY_ANNOTATION) |
1824 }, |
1916 }, |
1825 "reduce": GenerateFacetReducing("whiteSpace", True) |
1917 "reduce": GenerateFacetReducing("whiteSpace", True) |
1826 }, |
1918 }, |
1827 |
1919 |
1828 #------------------------------------------------------------------------------- |
1920 #------------------------------------------------------------------------------- |