A few days ago Mike wrote:

trailingEmpty is really "trailing empty lax"  ... any number of trailing 
separators will be accepted.



Ah! That can be used to enable any number of newlines between rows!



Here is an input where sometimes there is one NL between rows, sometimes there 
are two NL's between rows, and sometimes there are four NL's between rows:



[cid:[email protected]]



The combination of


dfdl:separator="%NL;"



and


dfdl:separatorSuppressionPolicy="trailingEmpty"



enables this functionality.



The below DFDL schema works great for any number of NL's between rows.



Do you agree that the way to implement the "arbitrary number of NL's between 
rows" capability is by using trailingEmpty?  /Roger


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






Reply via email to