THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block | ||
---|---|---|
| ||
<xs:simpleType name="fruitEnumType" dfdlx:repType="tns:fruitRepType"> <xs:restriction base="xs:string"> <xs:enumeration value="Apple" dfdlx:repValues="0" /> <xs:enumeration value="Banana" dfdlx:repValues="1" /> <xs:enumeration value="Disused" dfdlx:repValues="11 13 15" /> <xs:enumeration value="Illegal" dfdlx:repValues="12 14" dfdlx:repValueRanges=”3 10 16 255”/> </xs:restriction> </xs:simpleType> |
...
Code Block |
---|
<xs:simpleType name="fruitLocalType" dfdlx:inputTransforminputTypeCalc="{ dfdlx:repTypeValue() - 2 }" dfdlx:outputTransformoutputTypeCalc="{ dfdlx:logicalTypeValue() + 2 }" dfdlx:repValues="12 14" dfdlx:repValueRanges="3 10 16 255" > <xs:union> <xs:simpleType> <xs:restriction base="xs:int "> <xs:enumeration value="10"/> <xs:enumeration value="12"/> </xs:restriction> </xs:simpleType> <xs:simpleType> <xs:restriction base="xs:int"> <xs:minInclusive="1"/> <xs:maxInclusive="8"/> </xs:restriction> </xs:simpleType> <xs:simpleType> <xs:restriction base="xs:int"> <xs:minInclusive="14"/> <xs:maxInclusive="253"/> </xs:restriction> </xs:simpleType> </xs:union> </xs:simpleType> |
...
For example:
Code Block |
---|
<xs:choice dfdlx:choiceBranchKeyKind=”byType” dfdlx:choiceDispatchKeyKind=”byType”> <xs:element name=”fruit” type=”tns:fruitEnumType”/> <xs:element name=”localFruit” type=”tns:fruitLocalType”/> <xs:element name=”disused” type=”tns:fruitDisusedType”/> </xs:choice> |
...
Code Block |
---|
<xs:sequence > <xs:element name="raw" type="tns:fruitRepType" dfdlx:outputValueCalc=”dfdlx:outputTypeCalc(tns:fruitEnumType, ../fruit)”/> <xs:element name=”fruit” type=”tns:fruitEnumType” dfdlx:inputValueCalc=”dfdlx:inputTypeCalc(tns:fruitRepType, ../raw)”/> </xs:sequence> |
...
Code Block |
---|
<xs:sequence> <xs:element name="raw" type="tns:fruitIntType" dfdlx:outputValueCalc="dfdlx:outputTypeCalcNextSibling()" /> <xs:choice dfdlx:choiceBranchKeyKind="byType" dfdlx:choiceDispatchKeyKind=”explicit” dfdlx:choiceDispatchKey="../raw" > <xs:element name="fruit" type="tns:fruitType" dfdlx:inputValueCalc="dfdlx:inputTypeCalc(tns:fruitType, ../raw)" /> <xs:element name="localFruit" type="tns:fruitLocalType" dfdlx:inputValueCalc="dfdlx:inputTypeCalc(tns:fruitLocalType, ../raw)" /> <xs:element name="disused" type="tns:fruitDisuedType" dfdlx:inputValueCalc="dfdlx:inputTypeCalc(tns:fruitDisusedType, ../raw)" /> <xs:choice> </xs:sequence> |
...