Hello DFDL community,

Here is an element declaration that uses dfdl:lengthPattern

<xs:element name="label"
           type="xs:string"
           dfdl:lengthUnits="characters"
           dfdl:lengthKind="pattern"
           dfdl:lengthPattern="[\x20-\x7F]+?(?=[:])" />

dfdl:lengthPattern does not tell Daffodil, "The input must contain a string 
that matches this regex."

Rather, it merely tells Daffodil, "If the input contains a string that matches 
this regex, then use that matched string as the value of the element; 
otherwise, the value of the element is the empty string."

Is that correct?

/Roger

Reply via email to