|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
DFDL Escape characters included in Element Data |
« View previous topic :: View next topic » |
Author |
Message
|
iibwanted |
Posted: Fri Nov 10, 2017 2:49 pm Post subject: DFDL Escape characters included in Element Data |
|
|
Newbie
Joined: 10 Nov 2017 Posts: 2
|
Hi Experts,
i need to create a DFDL for a message which contains a delimiter in the scope of a record as the character inside the Element value.i tried to use escape character but came across the error :
Description Resource Path Location Type
CTDV1417E : DFDL property 'escapeCharacter' must be a valid single character or a DFDL entity that represents a single character, or an expression that returns one of those. DFDL defineEscapeScheme: SAMPLE_ES. DFDL_DELCONTENT.xsd /DFDL_DELCONTENT line 1 DFDL Validation Problem
My sample message looks like the below:
Code: |
BI666,jim tilbert,3267,west greenavenue
GG545,tom macbecth,6th street,losco drive
A Record for the above example comprises of
id,name,address where address element data has the delimiter as the part of the data.Please help me in getting the data parsed |
|
|
Back to top |
|
 |
timber |
Posted: Sat Nov 11, 2017 8:23 am Post subject: |
|
|
 Grand Master
Joined: 25 Aug 2015 Posts: 1292
|
Quote: |
CTDV1417E : DFDL property 'escapeCharacter' must be a valid single character or a DFDL entity that represents a single character, or an expression that returns one of those. DFDL defineEscapeScheme: SAMPLE_ES. DFDL_DELCONTENT.xsd /DFDL_DELCONTENT line 1 DFDL Validation Problem
|
That error is not a parsing error. Your DFDL schema is invalid because (I am guessing) you have set the Escape Character property to the empty string.
To parse the final field on each line, which contains commas, you could try the following:
- set lengthKind to 'endOfParent' on the final field. That *should* make the DFDL parser ignore the commas
- if that does not work, try using lengthKind='Pattern' and set the Length property to a regular expression that matches characters until an end-of-line character is found. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|