SimpleTypes with Ladon?

Asked by Lars Erik Utsi Gullerud on 2012-04-26

Using LadonType classes we can define a wide range of ComplexType definitions as necessary. However, we are trying to replace an existing (not very good) interface for a system with a webservice using Ladon. One problem has come up however - we want to change the existing interface as little as possible, as it already uses XML data, but the existing interface defines a lot of SimpleType definitions in the XSD - like this:

  <simpleType name="AssetStatus">
      <xsd:documentation xml:lang="en">
       This field identifies the current status of the asset.
    <restriction base="xsd:string">
      <xsd:enumeration value="Active"/>
      <xsd:enumeration value="Cancelled"/>
      <xsd:enumeration value="Closed"/>
      <xsd:enumeration value="In Progress"/>
      <xsd:enumeration value="Expired"/>
      <xsd:maxLength value="30"/>

Is it possible to generate SimpleTypes in Ladon apart from the built-in type conversions from python types to XSD? Any pointers to how, if it is possible?

Question information

English Edit question
ladon Edit question
No assignee Edit question
Last query:
Last reply:
jsgaarde (jakob-simon-gaarde) said : #1

Hi Erik.

Unfortunately not, I'll put it on the todo-list.

Is the information used on the client-side for GUI options, or is it just that you need server-side validation?

Ladon has a trigger-like feature where you can du validation:

Best Regards
Jakob Simon-Gaarde

Can you help with this problem?

Provide an answer of your own, or ask Lars Erik Utsi Gullerud for more information if necessary.

To post a message you must log in.