Hello DFDL community,

In the Windows EXE file format there is one or more Import_Lookup_Tables 
followed by a Hint_Name_Table. I am struggling with how to inform Daffodil, 
"Hey Daffodil, the input is finished with the Import_Lookup_Tables, now it's 
time to build the Hint_Name_Table." I am hoping you can show me how to inform 
Daffodil of this.

Each Import_Lookup_Table consists of one of more 32-bit fields, terminated by a 
32-bit field containing all nulls.

The Hint_Name_Table consists of one of more entries; each entry consists of a 
2-byte address, followed by a null-terminated name, followed by an optional 
null (to align to a 2-byte boundary).

Here is a graphic that illustrates the Import_Lookup_Tables followed by the 
Hint_Name_Table:

[cid:[email protected]]

Here is the relevant portion of my DFDL schema:

<xs:element name="idata_Section">
    <xs:complexType>
        <xs:sequence>>
            <xs:element ref="Import_Lookup_Table"
                        maxOccurs="unbounded" />
            <xs:element ref="Hint_Name_Table" />
        </xs:sequence>
    </xs:complexType>
</xs:element>

<xs:element name="Import_Lookup_Table">
    <xs:complexType>
        <xs:sequence>
            <xs:element ref="Lookup_Table_Entry"
                        maxOccurs="unbounded" />
            <xs:element name="Null_Lookup_Table_Entry"
                        type="xs:hexBinary"
                        dfdl:lengthKind="explicit"
                        dfdl:length="4"
                        dfdl:lengthUnits="bytes">
                <xs:annotation>
                    <xs:appinfo source="http://www.ogf.org/dfdl/";>
                        <dfdl:assert>
                            { . eq xs:hexBinary("00000000") }
                        </dfdl:assert>
                    </xs:appinfo>
                </xs:annotation>
            </xs:element>
        </xs:sequence>
    </xs:complexType>
</xs:element>

How do I inform Daffodil that the input has finished with the 
Import_Lookup_Tables?

/Roger


Reply via email to