Skip to content

Restrictions in model when using compile_xsd_file #71

@kuffel

Description

@kuffel

Is it possible to get the restrictions from the XSD file when using compile_xsd_file function?

Example XSD

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <xsd:complexType name="restrictions_test">
    <xsd:sequence>
      <xsd:element name="range" >
        <xsd:simpleType>
          <xsd:restriction base="xsd:integer" >
            <xsd:minInclusive value="0"/>
            <xsd:maxInclusive value="42"/>
          </xsd:restriction>
        </xsd:simpleType>
      </xsd:element>
    </xsd:sequence>
  </xsd:complexType>
</xsd:schema>

The model returned by compile_xsd_file does not contain the restriction:

{:model,
 [
   {:type, :_document, :sequence, [{:el, [], 1, 1, :undefined, 2}], [],
    :undefined, :undefined, 1, 1, 1, false, :undefined},
   {:type, :restrictions_test, :sequence,
    [
      {:el, [{:alt, :range, {:"#PCDATA", :char}, [], 1, 1, true, :undefined}],
       1, 1, :undefined, 2}
    ], [], :undefined, :undefined, 2, 1, 1, :undefined, :undefined}
 ], [{:ns, 'http://www.w3.org/2001/XMLSchema', 'xsd', :qualified}], :undefined,
 [], false, :skip}

Is there any option to allow getting the content of the restriction?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions