Hello DFDL community,

I have this input file:

[cid:[email protected]]

One way to characterize that file is every row is separated by exactly one 
newline, every row contains a string, and some rows contain a string of length 
zero.

Is it possible to express that characterization in DFDL?

I tried to implement it this way:

<xs:element name="label-message">
    <xs:complexType>
        <xs:sequence dfdl:separator="%NL;" dfdl:separatorPosition="infix">
            <xs:element name="row" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:choice>
                        <xs:sequence dfdl:separator=":" 
dfdl:separatorPosition="infix">
                            <xs:element name="label" type="xs:string" />
                            <xs:element name="message" type="xs:string" />
                        </xs:sequence>
                        <xs:sequence>
                        </xs:sequence>
                    </xs:choice>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
    </xs:complexType>
</xs:element>

But the output XML contained just the first two rows.

If there is a way to implement this characterization, would you show me the way 
please?

/Roger


Reply via email to