Update documentation
This commit is contained in:
parent
1c0e18b648
commit
97b5203ba6
|
@ -38,7 +38,7 @@ This library includes the following features:
|
|||
|
||||
.. note::
|
||||
Currently the XSD 1.1 validator is provided by class :class:`XMLSchema11` and
|
||||
the default :class:`XMLSchema` class is still linked the XSD 1.0 validator,
|
||||
the default :class:`XMLSchema` class is still an alias of the XSD 1.0 validator,
|
||||
the class :class:`XMLSchema10`. From version 1.1 of the package the default
|
||||
validator will be linked to the XSD 1.1 validator, a version that will also
|
||||
removes support for Python 2.7.
|
||||
|
@ -72,7 +72,7 @@ the file containing the schema as argument:
|
|||
|
||||
.. note::
|
||||
For XSD 1.1 schemas use the class :class:`XMLSchema11`, because the default class
|
||||
:class:`XMLSchema` is still linked to XSD 1.0 validator class :class:`XMLSchema10`.
|
||||
:class:`XMLSchema` is still an alias of the XSD 1.0 validator class :class:`XMLSchema10`.
|
||||
From next minor release (v1.1) the default class will become :class:`XMLSchema11`.
|
||||
|
||||
The schema can be used to validate XML documents:
|
||||
|
|
59
doc/api.rst
59
doc/api.rst
|
@ -173,12 +173,12 @@ XSD components API
|
|||
|
||||
XSD elements
|
||||
^^^^^^^^^^^^
|
||||
.. class:: xmlschema.validators.Xsd11Element
|
||||
.. autoclass:: xmlschema.validators.Xsd11Element
|
||||
.. autoclass:: xmlschema.validators.XsdElement
|
||||
|
||||
XSD attributes
|
||||
^^^^^^^^^^^^^^
|
||||
.. class:: xmlschema.validators.Xsd11Attribute
|
||||
.. autoclass:: xmlschema.validators.Xsd11Attribute
|
||||
.. autoclass:: xmlschema.validators.XsdAttribute
|
||||
|
||||
XSD types
|
||||
|
@ -186,27 +186,27 @@ XSD types
|
|||
.. autoclass:: xmlschema.validators.XsdType
|
||||
:members: is_simple, is_complex, is_atomic, is_empty, is_emptiable, has_simple_content,
|
||||
has_mixed_content, is_element_only
|
||||
.. class:: xmlschema.validators.Xsd11ComplexType
|
||||
.. autoclass:: xmlschema.validators.Xsd11ComplexType
|
||||
.. autoclass:: xmlschema.validators.XsdComplexType
|
||||
.. autoclass:: xmlschema.validators.XsdSimpleType
|
||||
.. class:: xmlschema.validators.XsdAtomicBuiltin
|
||||
.. class:: xmlschema.validators.XsdList
|
||||
.. class:: xmlschema.validators.Xsd11Union
|
||||
.. class:: xmlschema.validators.XsdUnion
|
||||
.. class:: xmlschema.validators.Xsd11AtomicRestriction
|
||||
.. class:: xmlschema.validators.XsdAtomicRestriction
|
||||
.. autoclass:: xmlschema.validators.XsdAtomicBuiltin
|
||||
.. autoclass:: xmlschema.validators.XsdList
|
||||
.. autoclass:: xmlschema.validators.Xsd11Union
|
||||
.. autoclass:: xmlschema.validators.XsdUnion
|
||||
.. autoclass:: xmlschema.validators.Xsd11AtomicRestriction
|
||||
.. autoclass:: xmlschema.validators.XsdAtomicRestriction
|
||||
|
||||
Attribute and model groups
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
.. autoclass:: xmlschema.validators.XsdAttributeGroup
|
||||
.. class:: xmlschema.validators.Xsd11Group
|
||||
.. autoclass:: xmlschema.validators.Xsd11Group
|
||||
.. autoclass:: xmlschema.validators.XsdGroup
|
||||
|
||||
Wildcards
|
||||
^^^^^^^^^
|
||||
.. class:: xmlschema.validators.Xsd11AnyElement
|
||||
.. autoclass:: xmlschema.validators.Xsd11AnyElement
|
||||
.. autoclass:: xmlschema.validators.XsdAnyElement
|
||||
.. class:: xmlschema.validators.Xsd11AnyAttribute
|
||||
.. autoclass:: xmlschema.validators.Xsd11AnyAttribute
|
||||
.. autoclass:: xmlschema.validators.XsdAnyAttribute
|
||||
.. autoclass:: xmlschema.validators.XsdOpenContent
|
||||
.. autoclass:: xmlschema.validators.XsdDefaultOpenContent
|
||||
|
@ -216,28 +216,28 @@ Identity constraints
|
|||
.. autoclass:: xmlschema.validators.XsdIdentity
|
||||
.. autoclass:: xmlschema.validators.XsdSelector
|
||||
.. autoclass:: xmlschema.validators.XsdFieldSelector
|
||||
.. class:: xmlschema.validators.Xsd11Unique
|
||||
.. class:: xmlschema.validators.XsdUnique
|
||||
.. class:: xmlschema.validators.Xsd11Key
|
||||
.. class:: xmlschema.validators.XsdKey
|
||||
.. class:: xmlschema.validators.Xsd11Keyref
|
||||
.. autoclass:: xmlschema.validators.Xsd11Unique
|
||||
.. autoclass:: xmlschema.validators.XsdUnique
|
||||
.. autoclass:: xmlschema.validators.Xsd11Key
|
||||
.. autoclass:: xmlschema.validators.XsdKey
|
||||
.. autoclass:: xmlschema.validators.Xsd11Keyref
|
||||
.. autoclass:: xmlschema.validators.XsdKeyref
|
||||
|
||||
Facets
|
||||
^^^^^^
|
||||
.. autoclass:: xmlschema.validators.XsdFacet
|
||||
.. class:: xmlschema.validators.XsdWhiteSpaceFacet
|
||||
.. class:: xmlschema.validators.XsdLengthFacet
|
||||
.. class:: xmlschema.validators.XsdMinLengthFacet
|
||||
.. class:: xmlschema.validators.XsdMaxLengthFacet
|
||||
.. class:: xmlschema.validators.XsdMinInclusiveFacet
|
||||
.. class:: xmlschema.validators.XsdMinExclusiveFacet
|
||||
.. class:: xmlschema.validators.XsdMaxInclusiveFacet
|
||||
.. class:: xmlschema.validators.XsdMaxExclusiveFacet
|
||||
.. class:: xmlschema.validators.XsdTotalDigitsFacet
|
||||
.. class:: xmlschema.validators.XsdFractionDigitsFacet
|
||||
.. class:: xmlschema.validators.XsdExplicitTimezoneFacet
|
||||
.. class:: xmlschema.validators.XsdAssertionFacet
|
||||
.. autoclass:: xmlschema.validators.XsdWhiteSpaceFacet
|
||||
.. autoclass:: xmlschema.validators.XsdLengthFacet
|
||||
.. autoclass:: xmlschema.validators.XsdMinLengthFacet
|
||||
.. autoclass:: xmlschema.validators.XsdMaxLengthFacet
|
||||
.. autoclass:: xmlschema.validators.XsdMinInclusiveFacet
|
||||
.. autoclass:: xmlschema.validators.XsdMinExclusiveFacet
|
||||
.. autoclass:: xmlschema.validators.XsdMaxInclusiveFacet
|
||||
.. autoclass:: xmlschema.validators.XsdMaxExclusiveFacet
|
||||
.. autoclass:: xmlschema.validators.XsdTotalDigitsFacet
|
||||
.. autoclass:: xmlschema.validators.XsdFractionDigitsFacet
|
||||
.. autoclass:: xmlschema.validators.XsdExplicitTimezoneFacet
|
||||
.. autoclass:: xmlschema.validators.XsdAssertionFacet
|
||||
.. autoclass:: xmlschema.validators.XsdEnumerationFacets
|
||||
.. autoclass:: xmlschema.validators.XsdPatternFacets
|
||||
|
||||
|
@ -300,3 +300,4 @@ Errors and exceptions
|
|||
|
||||
.. autoexception:: xmlschema.XMLSchemaIncludeWarning
|
||||
.. autoexception:: xmlschema.XMLSchemaImportWarning
|
||||
.. autoexception:: xmlschema.XMLSchemaTypeTableWarning
|
||||
|
|
|
@ -142,15 +142,35 @@ Testing with the W3C XML Schema 1.1 test suite
|
|||
----------------------------------------------
|
||||
|
||||
From release v1.0.11, using the script *test_w3c_suite.py*, you can run also tests based on the
|
||||
`W3C XML Schema 1.1 test suite <https://github.com/w3c/xsdtests>`_. To run these tests, currently
|
||||
limited to XSD 1.0 schema tests, clone the W3C repo on the project's parent directory and than
|
||||
run the script:
|
||||
`W3C XML Schema 1.1 test suite <https://github.com/w3c/xsdtests>`_. To run these tests clone the
|
||||
W3C repo on the project's parent directory and than run the script:
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
git clone https://github.com/w3c/xsdtests.git
|
||||
python xmlschema/xmlschema/tests/test_w3c_suite.py
|
||||
|
||||
You can also provides additional options for select a different set of tests:
|
||||
|
||||
**--xml**
|
||||
Add tests for instances, skipped for default.
|
||||
|
||||
**--xsd10**
|
||||
Run only XSD 1.0 tests.
|
||||
|
||||
**--xsd11**
|
||||
Run only XSD 1.1 tests.
|
||||
|
||||
**--valid**
|
||||
Run only tests signed as *valid*.
|
||||
|
||||
**--invalid**
|
||||
Run only tests signed as *invalid*.
|
||||
|
||||
**[NUM [NUM ...]]**
|
||||
Run only the cases that match a list of progressive numbers, associated
|
||||
to the test classes by the script.
|
||||
|
||||
|
||||
Testing other schemas and instances
|
||||
-----------------------------------
|
||||
|
|
Loading…
Reference in New Issue