Hi Folks, My input consists of 3 data items separated by slash, e.g.,
A/B/C The middle data item is optional. If there is no data for the middle data item, I want the separator suppressed (omitted), so I use separatorSuppressionPolicy="trailingEmpty". I expect this to be the appropriate input: A/C Is that correct? When I run my DFDL schema I get this error: Parse Error: Separator '/' not found When I use this input: A//C There is no error. I'm confused. I thought separatorSuppressionPolicy="trailingEmpty" means that I can suppress (omit) the separator when there is no data available. What am I failing to understand? Below is my DFDL schema. /Roger <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:dfdl="http://www.ogf.org/dfdl/dfdl-1.0/" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:annotation> <xs:appinfo source="http://www.ogf.org/dfdl/"> <dfdl:format textBidi="no" floating="no" encodingErrorPolicy="replace" outputNewLine="%CR;%LF;" leadingSkip="0" trailingSkip="0" alignment="1" alignmentUnits="bytes" textPadKind="none" textTrimKind="none" truncateSpecifiedLengthString="no" escapeSchemeRef="" representation="text" encoding="ASCII" lengthKind="delimited" initiator="" terminator="" ignoreCase="yes" sequenceKind="ordered" separator="" initiatedContent="no" emptyValueDelimiterPolicy="none" fillByte="%SP;" textNumberRep="standard" textStandardBase="10" textStandardZeroRep="0" textNumberRounding="pattern" textStandardExponentRep="E" textNumberCheckPolicy="strict" lengthUnits="characters" nilKind="literalValue" nilValue="-" nilValueDelimiterPolicy="none" separatorSuppressionPolicy="trailingEmptyStrict"/> </xs:appinfo> </xs:annotation> <xs:element name="test"> <xs:complexType> <xs:sequence dfdl:separator="/" dfdl:separatorPosition="infix" dfdl:separatorSuppressionPolicy="trailingEmpty"> <xs:element name="A" type="non-zero-length-string" dfdl:lengthPattern="A"/> <xs:element name="B" minOccurs="0" dfdl:occursCountKind="implicit" type="non-zero-length-string" dfdl:lengthPattern="B"/> <xs:element name="C" type="non-zero-length-string" dfdl:lengthPattern="C"/> </xs:sequence> </xs:complexType> </xs:element> <xs:simpleType name="non-zero-length-string" dfdl:lengthKind="pattern"> <xs:annotation> <xs:appinfo source="http://www.ogf.org/dfdl/"> <dfdl:assert test="{ . ne '' }"/> </xs:appinfo> </xs:annotation> <xs:restriction base="xs:string"/> </xs:simpleType> </xs:schema>