|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
DLDL Separator as input character |
« View previous topic :: View next topic » |
Author |
Message
|
Thomas2ab |
Posted: Tue Sep 02, 2014 10:06 am Post subject: DLDL Separator as input character |
|
|
Acolyte
Joined: 07 Mar 2014 Posts: 51
|
Hello everyone,
I have a small question:
I was wondering if it was possible to override the dfld sparator by a filed coming from the xml input message?
For example, by default in my dfdl schema I have defined dfdl:separator=";".
But the requisite is that the separator will come from an input field in an xml message. Which means that it can changes per message.
Basically it will be something like '<' or '|' or even ';' but I cannot be sure 100% what it will be.
Thanks!
Regards, |
|
Back to top |
|
 |
kimbert |
Posted: Tue Sep 02, 2014 11:11 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Yes - this is possible, but it will take a little bit of invention.
DFDL allows you to set the value of a separator from a previous field in the message. So the very first occurrence of this separator must be modelled as a 1-character fixed-length field. Then the remainder of the message can refer to that value. That means that the first field ( and its 1-character separator field ) must be outside of the sequence group that contains the remainder of the message.
Code: |
Message
firstField
separatorField length=1 lengthUnits=characters
sequence separator='{../separatorField}' separatorSuppressionPolicy='trailingEmptyStrict'
Field2
Field3
..
|
_________________ Before you criticize someone, walk a mile in their shoes. That way you're a mile away, and you have their shoes too. |
|
Back to top |
|
 |
Thomas2ab |
Posted: Tue Sep 02, 2014 12:54 pm Post subject: |
|
|
Acolyte
Joined: 07 Mar 2014 Posts: 51
|
Perfect, as usual!
Thanks! |
|
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
|
|
|
|