shiroyuki / Imagination

Java Beans-inspired Dependency Injection Framework for Python
https://imagination.readthedocs.io/en/latest/
4 stars 2 forks source link

Support a dictionary in the XML schema #13

Closed shiroyuki closed 11 years ago

shiroyuki commented 12 years ago

Extending from the defined/documented schema, let's define DATA_TYPE as equivalent to PARAMETER_TYPE, and DATA_VALUE as equivalent to PARAMETER_VALUE. If a particular parameter is required to be a list, then the following schema should be supported.

<parameter type="dict" name="PARAMETER_NAME">
    ENTRY_ITEM*
</parameter>

where dict is a DATA_TYPE and either one of list, tuple or set and each ENTRY_ITEM is defined as:

<item name="DICT_KEY" type="DATA_TYPE">DATA_VALUE</item>

This task is to support the enhancement.

shiroyuki commented 11 years ago

Done in 896c7b0eeb64a41ed49fd8a7c68e48d8e002e0f6.