Posted: Wed Oct 24, 2018 3:41 am Post subject: XSD Schema validation for Message set with groups and length
Newbie
Joined: 22 Aug 2018 Posts: 4
I am looking for a regular expression for XSD that finds the character but not match it to the group..
For instance: /AB-AAAA<CR><LF>
Regular expression: /[A][B]-[A]{4}
If I am using above expression the exceeding length values are been assigned to sequence.
Regular expression: /[A][B]-[A]{4}(?=\r), this may work but positive look ahead is not supported for XSD, Please share any other xsd that can resolve this issue
Please supply more information about what you are trying to do. Provide examples of strings that should and should not match. Explain what the overall task of the message flow is.
Choice- Use data pattern
Sequence1- /[A][B]-[A]{4}
Code
Sequence2
Address
Input messages are
1 /AB-AAAA<cr><lf> --- Assign to Sequence1
When /[A][B]-[A]{4} pattern is used for the date with length more than 4 is assigned to sequence thus failing the validation. Expectation is it should assign to sequence 2. I cannot use crlf in the pattern as that is a delimiter for parent tag and will fail there if there is no match of crlf
However, the pattern can use crlf for the match and ignore the match later.
2 /AB-AAAAAAAA --- Assign to sequence 2
You are creating a new message model for use by the TDS parser?!
You should be using the DFDL parser - it is easier to use and provides better debugging facilities.
Please post *full* details of the format that you are trying to parse - not just a couple of lines, the full message. And please provide examples of messages that should fail, as requested previously.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum