Hello DFDL community,

I have a binary input file containing:

               string null(s) string null(s) ....

Here is my input file:

[cid:[email protected]]

Notice that each string is followed by one or more null symbols.

One way to characterize the input is that there is a list of:

string followed by one or more nulls

The schema below is my attempt to faithfully implement that characterization. 
However, when I execute the schema, I get this "infinite loop" error message:

[error] Parse Error: Repeating or Optional Element -
No forward progress at byte 47. Attempt to parse
List_of_strings succeeded but consumed no data.
Please re-examine your schema to correct this infinite loop.

I do not understand where the infinite loop is occurring. Would you explain, 
please? How to fix it?  /Roger

<xs:element name="input">
    <xs:complexType>
        <xs:sequence>
            <xs:element name="List_of_strings" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="string" type="xs:string"
                            dfdl:lengthKind="pattern"
                            dfdl:lengthPattern="[\x01-\xFF]+?(?=\x00)"
                            dfdl:representation="text"
                            dfdl:encoding="ISO-8859-1"/>
                        <xs:sequence dfdl:hiddenGroupRef="hidden_null_Group" />
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
    </xs:complexType>
</xs:element>

<xs:group name="hidden_null_Group">
    <xs:sequence>
        <xs:element name="Hidden_null" type="xs:hexBinary"
            dfdl:lengthKind="pattern"
            dfdl:lengthUnits="bytes"
            dfdl:lengthPattern="[\x00]+?(?=([^\x00]|$))" 
dfdl:outputValueCalc='{ . }' />
    </xs:sequence>
</xs:group>



Reply via email to