Hi Folks,
Good input contains a digit followed by a letter, e.g., this is good input: 1H
Anything else is bad input, e.g., this is bad input: 1H23
If the input is good, I want to put the input into a <valid> element, e.g.,
<valid>1H</valid>
If the input is bad, I want to put the input into an <invalid> element, e.g.,
<invalid>1H23</invalid>
This DFDL seems to work:
<xs:choice>
<xs:sequence dfdl:terminator="%NL;">
<xs:element name="valid" type="xs:string" dfdl:lengthKind="pattern"
dfdl:lengthPattern="[0-9][a-zA-Z]" />
</xs:sequence>
<xs:element name="invalid" type="xs:string"/>
</xs:choice>
But that doesn't seem like a good solution. Is there a better way to solve this
problem?
/Roger