Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Support for simpleType restrictions/facets #1303

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Commits on Mar 18, 2022

  1. Mark tests failing on master as xfail

    These need sorting by a maintainer, but I want a clear test run against
    which to verify my forthcoming changes.
    ch3pjw committed Mar 18, 2022
    Configuration menu
    Copy the full SHA
    7102d0f View commit details
    Browse the repository at this point in the history
  2. Parse restriction/facet information

    ...and include in a `facets` class attribute on generated types. This
    means that the result of parsing something like
    
    ```
    <xs:simpleType name="MyEnum">
      <xs:restriction base="xs:string">
        <xs:enumeration value="a"/>
        <xs:enumeration value="b"/>
      </xs:restriction>
    </xs:simpleType>
    ```
    
    should yield something like
    
    ```
    >>> MyEnum = client.get_type('{namespace}MyEnum')
    >>> MyEnum.facets.enumeration
    ["a", "b"]
    
    We do not (yet) attempt to verify the facets hold when parsing XML or
    accepting Python data.
    ch3pjw committed Mar 18, 2022
    Configuration menu
    Copy the full SHA
    cdc9d35 View commit details
    Browse the repository at this point in the history