| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| |
| <tdml:testSuite xmlns:ex="http://example.com" xmlns="http://example.com" |
| xmlns:tdml="http://www.ibm.com/xmlns/dfdl/testData" |
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| xmlns:dfdl="http://www.ogf.org/dfdl/dfdl-1.0/" |
| xmlns:dfdlx="http://www.ogf.org/dfdl/dfdl-1.0/extensions" |
| xmlns:tns="http://example.com" |
| xmlns:xs="http://www.w3.org/2001/XMLSchema"> |
| |
| <tdml:defineSchema name="inputTypeCalc-Embedded.dfdl.xsd"> |
| |
| <xs:include schemaLocation="org/apache/daffodil/xsd/DFDLGeneralFormat.dfdl.xsd"/> |
| <dfdl:format ref="ex:GeneralFormat" lengthKind="delimited" |
| lengthUnits="bytes" encoding="UTF-8" separator="" initiator="" |
| terminator="" occursCountKind="parsed" ignoreCase="no" |
| textNumberRep="standard" representation="text" /> |
| |
| <xs:element name="keysetValue_00" type="tns:keysetValue_01" /> |
| |
| <xs:element name="keysetValue_01"> |
| <xs:complexType> |
| <xs:sequence> |
| <xs:element name="byte" type="tns:keysetValue_01" maxOccurs="1" dfdl:occursCountKind="parsed"/> |
| </xs:sequence> |
| </xs:complexType> |
| </xs:element> |
| |
| <xs:simpleType name="keysetValue_01_repType" dfdl:lengthKind="explicit" dfdl:length="1"> |
| <xs:restriction base="xs:unsignedInt" /> |
| </xs:simpleType> |
| |
| <xs:simpleType name="keysetValue_01" dfdlx:repType="tns:keysetValue_01_repType"> |
| <xs:restriction base="xs:string"> |
| <xs:enumeration value="zero" dfdlx:repValues="0" /> |
| <xs:enumeration value="one" dfdlx:repValues="1" /> |
| <xs:enumeration value="2-100" dfdlx:repValueRanges="2 100" /> |
| <xs:enumeration value="101 103-110 115 120-125" dfdlx:repValues="101 115" dfdlx:repValueRanges="103 110 120 125"/> |
| </xs:restriction> |
| </xs:simpleType> |
| |
| </tdml:defineSchema> |
| |
| <tdml:parserTestCase name="InputTypeCalc_keysetValue_00" |
| root="keysetValue_00" model="inputTypeCalc-Embedded.dfdl.xsd" description="Extensions - inputTypeCalc keysetValue transform"> |
| |
| <tdml:document> |
| <tdml:documentPart type="byte"> |
| 00 |
| </tdml:documentPart> |
| </tdml:document> |
| <tdml:infoset> |
| <tdml:dfdlInfoset xmlns:xs="http://www.w3.org/2001/XMLSchema" |
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> |
| <keysetValue_01> |
| <byte>zero</byte> |
| </keysetValue_01> |
| </tdml:dfdlInfoset> |
| </tdml:infoset> |
| </tdml:parserTestCase> |
| |
| <!-- |
| |
| <tdml:parserTestCase name="InputTypeCalc_keysetValue_01" |
| root="keysetValue_01" model="inputTypeCalc-Embedded.dfdl.xsd" description="Extensions - inputTypeCalc keysetValue transform"> |
| |
| <tdml:document> |
| <tdml:documentPart type="byte"> |
| 00 |
| 01 |
| 02 20 64 |
| 65 67 68 6E 73 78 7A 7D |
| </tdml:documentPart> |
| </tdml:document> |
| <tdml:infoset> |
| <tdml:dfdlInfoset xmlns:xs="http://www.w3.org/2001/XMLSchema" |
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> |
| <keysetValue_01> |
| <byte>zero</byte> |
| <byte>one</byte> |
| <byte>2-100</byte> |
| <byte>2-100</byte> |
| <byte>2-100</byte> |
| <byte>101 103-110 115 120-125</byte> |
| <byte>101 103-110 115 120-125</byte> |
| <byte>101 103-110 115 120-125</byte> |
| <byte>101 103-110 115 120-125</byte> |
| <byte>101 103-110 115 120-125</byte> |
| <byte>101 103-110 115 120-125</byte> |
| <byte>101 103-110 115 120-125</byte> |
| <byte>101 103-110 115 120-125</byte> |
| </keysetValue_01> |
| </tdml:dfdlInfoset> |
| </tdml:infoset> |
| </tdml:parserTestCase> |
| --> |
| |
| </tdml:testSuite> |