|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
DFDL Fixed length repeating structure |
« View previous topic :: View next topic » |
Author |
Message
|
vishnurajnr |
Posted: Thu Jul 30, 2015 6:46 am Post subject: DFDL Fixed length repeating structure |
|
|
 Centurion
Joined: 08 Aug 2011 Posts: 134 Location: Trivandrum
|
Hi,
WMB Version: 8.0.0.4
I need to model a message having Header, body and trailer records- All are fixed length (lets say length of 10 characters each line)
Message structure will be as follows
Code: |
Header Line (mandatory)
Body Line 1 (optional)
Body Line 2 (optional)
Body Line 3 (optional), unbounded
Trailer Line (mandatory) |
The issue I ma facing here is with Body line 3 which is unbounded occurrence. The below model is not working when put unbounded. But the same is working if I put the max occurrence to concrete value (like 2 or 3 for example).
Any hints to resolve this error ?
DFDL XSD:
-----------------------------
Code: |
<?xml version="1.0" encoding="UTF-8"?><xsd:schema xmlns:dfdl="http://www.ogf.org/dfdl/dfdl-1.0/" xmlns:ibmDfdlExtn="http://www.ibm.com/dfdl/extensions" xmlns:ibmSchExtn="http://www.ibm.com/schema/extensions" xmlns:recSepFieldsFmt="http://www.ibm.com/dfdl/RecordSeparatedFieldFormat" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:import namespace="http://www.ibm.com/dfdl/RecordSeparatedFieldFormat" schemaLocation="IBMdefined/RecordSeparatedFieldFormat.xsd"/>
<xsd:element ibmSchExtn:docRoot="true" name="Root">
<xsd:complexType>
<xsd:sequence dfdl:separator="%NL;">
<xsd:element dfdl:representation="text" name="SingleRec" type="SampleRecord"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:complexType name="SampleRecord">
<xsd:sequence dfdl:separator="%NL;">
<xsd:element dfdl:emptyValueDelimiterPolicy="none" dfdl:initiator="00H-" dfdl:length="10" dfdl:lengthKind="explicit" dfdl:representation="text" name="Header" type="xsd:string"/>
<xsd:element dfdl:emptyValueDelimiterPolicy="none" dfdl:initiator="00B1-" dfdl:length="10" dfdl:lengthKind="explicit" dfdl:occursCountKind="implicit" dfdl:representation="text" minOccurs="0" name="Body1" type="xsd:string"/>
<xsd:element dfdl:emptyValueDelimiterPolicy="none" dfdl:initiator="00B2-" dfdl:length="10" dfdl:lengthKind="explicit" dfdl:occursCountKind="implicit" dfdl:representation="text" minOccurs="0" name="Body2" type="xsd:string"/>
<xsd:element dfdl:emptyValueDelimiterPolicy="none" dfdl:initiator="00B3-" dfdl:length="10" dfdl:lengthKind="explicit" dfdl:occursCountKind="implicit" dfdl:representation="text" maxOccurs="unbounded" minOccurs="1" name="Body3" type="xsd:string"/>
<xsd:element dfdl:emptyValueDelimiterPolicy="none" dfdl:initiator="00T1-" dfdl:length="10" dfdl:lengthKind="explicit" dfdl:representation="text" name="Tail" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
<xsd:annotation>
<xsd:appinfo source="http://www.ogf.org/dfdl/">
<dfdl:format byteOrder="{$dfdl:byteOrder}" encoding="US-ASCII" escapeSchemeRef="recSepFieldsFmt:RecordEscapeScheme" occursCountKind="fixed" ref="recSepFieldsFmt:RecordSeparatedFieldsFormat"/>
</xsd:appinfo>
</xsd:annotation>
</xsd:schema> |
------------------------------
Sample data
----------------
Code: |
00H-1234567890
00B1-1234567890
00B2-2345678900
00B3-2345678900
00B3-2345678900
00B3-2345678901
00T1-2345678901
00H-1234567890
00B2-2345678901
00B3-2345678901
00B3-2345678901
00B3-2345678901
00B3-2345678901
00B3-2345678901
00T1-2345678901
00H-1234567890
00B1-1234567891
00B3-2345678901
00B3-2345678901
00B3-2345678901
00T1-2345678901 |
---------------------------
DFDL Trace as below:
Code: |
********************* DFDL Parser Setup Starting *********************
Schema = /TesModel/TestMsg.xsd
**********************************************************************
********************* DFDL Parser Starting *********************
Data = D:\Test\sampleData.txt
Message = Root (/TesModel/TestMsg.xsd)
****************************************************************
30 Jul 2015 15:36:22 info: Offset: 0. Parsing will start from root element 'Root'.
[dfdl = /TesModel/TestMsg.xsd, scd = #xscd(/schemaElement::Root), 63]
30 Jul 2015 15:36:22 info: The default value of '%LF;' was assigned to variable 'outputNewLine' in namespace 'http://www.ogf.org/dfdl/dfdl-1.0/'.
[dfdl = /TesModel/TestMsg.xsd, scd = , 133]
30 Jul 2015 15:36:22 info: Offset: 0. Starting to process element 'Root'.
[dfdl = /TesModel/TestMsg.xsd, scd = #xscd(/schemaElement::Root), 54]
30 Jul 2015 15:36:22 info: Offset: 0. Starting to process element 'SingleRec'.
[dfdl = /TesModel/TestMsg.xsd, scd = #xscd(/schemaElement::Root/type::0/model::sequence/schemaElement::SingleRec), 59]
30 Jul 2015 15:36:22 info: Offset: 0. Starting to process element 'Header'.
[dfdl = /TesModel/TestMsg.xsd, scd = #xscd(/type::SampleRecord/model::sequence/schemaElement::Header), 56]
30 Jul 2015 15:36:22 info: Offset: 0. Found initiator '00H-' for 'Header'
[dfdl = /TesModel/TestMsg.xsd, scd = #xscd(/type::SampleRecord/model::sequence/schemaElement::Header), 54]
30 Jul 2015 15:36:22 info: Offset: 4. Found fixed length value: '1234567890' for element 'Header'.
[dfdl = /TesModel/TestMsg.xsd, scd = #xscd(/type::SampleRecord/model::sequence/schemaElement::Header), 79]
30 Jul 2015 15:36:22 info: Offset: 14. Finished processing element 'Header'.
[dfdl = /TesModel/TestMsg.xsd, scd = #xscd(/type::SampleRecord/model::sequence/schemaElement::Header), 57]
30 Jul 2015 15:36:22 info: Offset: 14. Optional element 'Body1' encountered. The DFDL parser will return to this position if the element is not present in the data stream.
[dfdl = /TesModel/TestMsg.xsd, scd = #xscd(/type::SampleRecord/model::sequence/schemaElement::Body1), 152]
30 Jul 2015 15:36:22 info: Offset: 14. Found separator '%NL;' owned by the 'sequence' group contained within element 'SingleRec'.
[dfdl = /TesModel/TestMsg.xsd, scd = #xscd(/type::SampleRecord/model::sequence), 110]
30 Jul 2015 15:36:22 info: Offset: 16. Starting to process element 'Body1'.
[dfdl = /TesModel/TestMsg.xsd, scd = #xscd(/type::SampleRecord/model::sequence/schemaElement::Body1), 56]
30 Jul 2015 15:36:22 info: Offset: 16. Found initiator '00B1-' for 'Body1'
[dfdl = /TesModel/TestMsg.xsd, scd = #xscd(/type::SampleRecord/model::sequence/schemaElement::Body1), 55]
30 Jul 2015 15:36:22 info: Offset: 21. Found fixed length value: '1234567890' for element 'Body1'.
[dfdl = /TesModel/TestMsg.xsd, scd = #xscd(/type::SampleRecord/model::sequence/schemaElement::Body1), 79]
30 Jul 2015 15:36:22 info: Offset: 31. Finished processing element 'Body1'.
[dfdl = /TesModel/TestMsg.xsd, scd = #xscd(/type::SampleRecord/model::sequence/schemaElement::Body1), 56]
30 Jul 2015 15:36:22 info: Offset: 31. Optional element 'Body2' encountered. The DFDL parser will return to this position if the element is not present in the data stream.
[dfdl = /TesModel/TestMsg.xsd, scd = #xscd(/type::SampleRecord/model::sequence/schemaElement::Body2), 152]
30 Jul 2015 15:36:22 info: Offset: 31. Found separator '%NL;' owned by the 'sequence' group contained within element 'SingleRec'.
[dfdl = /TesModel/TestMsg.xsd, scd = #xscd(/type::SampleRecord/model::sequence), 110]
30 Jul 2015 15:36:22 info: Offset: 33. Starting to process element 'Body2'.
[dfdl = /TesModel/TestMsg.xsd, scd = #xscd(/type::SampleRecord/model::sequence/schemaElement::Body2), 56]
30 Jul 2015 15:36:22 info: Offset: 33. Found initiator '00B2-' for 'Body2'
[dfdl = /TesModel/TestMsg.xsd, scd = #xscd(/type::SampleRecord/model::sequence/schemaElement::Body2), 55]
30 Jul 2015 15:36:22 info: Offset: 38. Found fixed length value: '2345678900' for element 'Body2'.
[dfdl = /TesModel/TestMsg.xsd, scd = #xscd(/type::SampleRecord/model::sequence/schemaElement::Body2), 79]
30 Jul 2015 15:36:22 info: Offset: 48. Finished processing element 'Body2'.
[dfdl = /TesModel/TestMsg.xsd, scd = #xscd(/type::SampleRecord/model::sequence/schemaElement::Body2), 56]
30 Jul 2015 15:36:22 info: Offset: 48. Up to '-1' occurrences of element 'Body3' will be expected because occursCountKind='implicit' and maxOccurs='-1'.
[dfdl = /TesModel/TestMsg.xsd, scd = #xscd(/type::SampleRecord/model::sequence/schemaElement::Body3), 133]
30 Jul 2015 15:36:22 info: Offset: 48. Found separator '%NL;' owned by the 'sequence' group contained within element 'SingleRec'.
[dfdl = /TesModel/TestMsg.xsd, scd = #xscd(/type::SampleRecord/model::sequence), 110]
30 Jul 2015 15:36:22 info: Offset: 50. Starting to process element 'Body3'.
[dfdl = /TesModel/TestMsg.xsd, scd = #xscd(/type::SampleRecord/model::sequence/schemaElement::Body3), 56]
30 Jul 2015 15:36:22 info: Offset: 50. Found initiator '00B3-' for 'Body3'
[dfdl = /TesModel/TestMsg.xsd, scd = #xscd(/type::SampleRecord/model::sequence/schemaElement::Body3), 55]
30 Jul 2015 15:36:22 info: Offset: 55. Found fixed length value: '2345678900' for element 'Body3'.
[dfdl = /TesModel/TestMsg.xsd, scd = #xscd(/type::SampleRecord/model::sequence/schemaElement::Body3), 79]
30 Jul 2015 15:36:22 info: Offset: 65. Finished processing element 'Body3'.
[dfdl = /TesModel/TestMsg.xsd, scd = #xscd(/type::SampleRecord/model::sequence/schemaElement::Body3), 56]
30 Jul 2015 15:36:22 info: Offset: 65. Optional element 'Body3' encountered. The DFDL parser will return to this position if the element is not present in the data stream.
[dfdl = /TesModel/TestMsg.xsd, scd = #xscd(/type::SampleRecord/model::sequence/schemaElement::Body3), 152]
30 Jul 2015 15:36:22 info: Offset: 65. Found separator '%NL;' owned by the 'sequence' group contained within element 'SingleRec'.
[dfdl = /TesModel/TestMsg.xsd, scd = #xscd(/type::SampleRecord/model::sequence), 110]
30 Jul 2015 15:36:22 info: Offset: 67. Starting to process element 'Body3'.
[dfdl = /TesModel/TestMsg.xsd, scd = #xscd(/type::SampleRecord/model::sequence/schemaElement::Body3), 56]
30 Jul 2015 15:36:22 info: Offset: 67. Found initiator '00B3-' for 'Body3'
[dfdl = /TesModel/TestMsg.xsd, scd = #xscd(/type::SampleRecord/model::sequence/schemaElement::Body3), 55]
30 Jul 2015 15:36:22 info: Offset: 72. Found fixed length value: '2345678900' for element 'Body3'.
[dfdl = /TesModel/TestMsg.xsd, scd = #xscd(/type::SampleRecord/model::sequence/schemaElement::Body3), 79]
30 Jul 2015 15:36:22 info: Offset: 82. Finished processing element 'Body3'.
[dfdl = /TesModel/TestMsg.xsd, scd = #xscd(/type::SampleRecord/model::sequence/schemaElement::Body3), 56]
30 Jul 2015 15:36:22 info: Offset: 82. Optional element 'Body3' encountered. The DFDL parser will return to this position if the element is not present in the data stream.
[dfdl = /TesModel/TestMsg.xsd, scd = #xscd(/type::SampleRecord/model::sequence/schemaElement::Body3), 152]
30 Jul 2015 15:36:22 info: Offset: 82. Found separator '%NL;' owned by the 'sequence' group contained within element 'SingleRec'.
[dfdl = /TesModel/TestMsg.xsd, scd = #xscd(/type::SampleRecord/model::sequence), 110]
30 Jul 2015 15:36:22 info: Offset: 84. Starting to process element 'Body3'.
[dfdl = /TesModel/TestMsg.xsd, scd = #xscd(/type::SampleRecord/model::sequence/schemaElement::Body3), 56]
30 Jul 2015 15:36:22 info: Offset: 84. Found initiator '00B3-' for 'Body3'
[dfdl = /TesModel/TestMsg.xsd, scd = #xscd(/type::SampleRecord/model::sequence/schemaElement::Body3), 55]
30 Jul 2015 15:36:22 info: Offset: 89. Found fixed length value: '2345678901' for element 'Body3'.
[dfdl = /TesModel/TestMsg.xsd, scd = #xscd(/type::SampleRecord/model::sequence/schemaElement::Body3), 79]
30 Jul 2015 15:36:22 info: Offset: 99. Finished processing element 'Body3'.
[dfdl = /TesModel/TestMsg.xsd, scd = #xscd(/type::SampleRecord/model::sequence/schemaElement::Body3), 56]
30 Jul 2015 15:36:22 info: Offset: 99. Optional element 'Body3' encountered. The DFDL parser will return to this position if the element is not present in the data stream.
[dfdl = /TesModel/TestMsg.xsd, scd = #xscd(/type::SampleRecord/model::sequence/schemaElement::Body3), 152]
30 Jul 2015 15:36:22 info: Offset: 99. Found separator '%NL;' owned by the 'sequence' group contained within element 'SingleRec'.
[dfdl = /TesModel/TestMsg.xsd, scd = #xscd(/type::SampleRecord/model::sequence), 110]
30 Jul 2015 15:36:22 info: Offset: 101. Starting to process element 'Body3'.
[dfdl = /TesModel/TestMsg.xsd, scd = #xscd(/type::SampleRecord/model::sequence/schemaElement::Body3), 57]
30 Jul 2015 15:36:22 info: Offset: 101. Did not find initiator for 'Body3'
[dfdl = /TesModel/TestMsg.xsd, scd = #xscd(/type::SampleRecord/model::sequence/schemaElement::Body3), 55]
30 Jul 2015 15:36:22 info: Offset: 101. Element 'Body3' is empty because the initiator was not found in the data stream.
[dfdl = /TesModel/TestMsg.xsd, scd = #xscd(/type::SampleRecord/model::sequence/schemaElement::Body3), 101]
30 Jul 2015 15:36:22 info: Offset: 101. Element 'Body3' is optional and empty or missing. The element will not be included in the infoset.
[dfdl = /TesModel/TestMsg.xsd, scd = #xscd(/type::SampleRecord/model::sequence/schemaElement::Body3), 119]
30 Jul 2015 15:36:22 info: Offset: 101. Finished processing element 'Body3'.
[dfdl = /TesModel/TestMsg.xsd, scd = #xscd(/type::SampleRecord/model::sequence/schemaElement::Body3), 57]
30 Jul 2015 15:36:22 info: Offset: 101. Optional element 'Body3' encountered. The DFDL parser will return to this position if the element is not present in the data stream.
[dfdl = /TesModel/TestMsg.xsd, scd = #xscd(/type::SampleRecord/model::sequence/schemaElement::Body3), 153]
30 Jul 2015 15:36:22 error: CTDP3058E: Separator '%NL;' not found at offset '101' for sequence or choice within element '/Root[1]/SingleRec[1]'.
30 Jul 2015 15:36:22 fatal: CTDP3058E: Separator '%NL;' not found at offset '101' for sequence or choice within element '/Root[1]/SingleRec[1]'.
|
|
|
Back to top |
|
 |
mqjeff |
Posted: Thu Jul 30, 2015 7:32 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
You should be using tags - which if I recall DFDL calls "indicators". Or maybe "separators".
You would then be able to use the 00B to say "this is still a body" and the 00T to say "this is the trailer".
You will then need to wrap the message that holds the 00H, 00B and 00T records as part of a sequence into *another* sequence that repeats until the end of the message (unlimited repeats). |
|
Back to top |
|
 |
kimbert |
Posted: Thu Jul 30, 2015 1:27 pm Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
mqjeff is correct, but the OP appears to be using initiators throughout the schema already.
I looked at the DFDL trace and it looks like a product defect to me. I recommend:
- upgrade to WMB v8.0.0.5 ( there are some fairly significant DFDL fixes in that version )
- if that does not fix the problem, download the developer version of IIB v10 and try the scenario. If that works, then it's a defect in v8.0.0.5. _________________ 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 |
|
 |
vishnurajnr |
Posted: Fri Jul 31, 2015 1:07 am Post subject: |
|
|
 Centurion
Joined: 08 Aug 2011 Posts: 134 Location: Trivandrum
|
Thanks mqjeff and kimbert.
I have updated my WMB to 8.0.0.6 and still I m getting the same error.
I do not have the IIB V10 env at present, will give it a try shortly. |
|
Back to top |
|
 |
Vitor |
Posted: Fri Jul 31, 2015 4:17 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
vishnurajnr wrote: |
I have updated my WMB to 8.0.0.6 and still I m getting the same error. |
If it was me (and I accept it isn't) I'd raise a PMR and reference this thread in the problem description just to cover all the bases.
vishnurajnr wrote: |
I do not have the IIB V10 env at present, will give it a try shortly. |
FWIW I got interested (and got some spare time) yesterday and got what I interpreted to be your message structure working in IIBv9 using your schema and mqjeff's suggestion to handle the different elements. I'm by no means saying that's the right way or the best way. I have not spent as much time with DFDL as I would like and my skills are still building, but I did get a schema with parsed. Nor am I saying that the file I used for a test parse is not in fact based in a misinterpretation of your post, and differs in some significant way.
It was do this or attend a planning meeting (which I delegated to my manager). Sick of using DFDL for COBOL copybooks and CSV files..... _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
kimbert |
Posted: Fri Jul 31, 2015 4:36 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
Sick of using DFDL for COBOL copybooks and CSV files... |
That statement seems at odds with the rest of your post...? _________________ 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 |
|
 |
Vitor |
Posted: Fri Jul 31, 2015 4:41 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
kimbert wrote: |
Quote: |
Sick of using DFDL for COBOL copybooks and CSV files... |
That statement seems at odds with the rest of your post...? |
I'm posting on only 2 cups of coffee.
I meant DFDL is very good for copybooks and CSV, but the wizards are equally good so I don't get much exposure to exotic DFDL schemas and all the shiny fun stuff like initiators and tagged records. My DFDL world is editing schemas where the copybook said S9(9) COMP-3 and, after we've spent hours investigating the defect the development team have admitted that's not the copybook they're actually using....... _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
vishnurajnr |
Posted: Fri Jul 31, 2015 6:09 pm Post subject: |
|
|
 Centurion
Joined: 08 Aug 2011 Posts: 134 Location: Trivandrum
|
Vitor wrote: |
FWIW I got interested (and got some spare time) yesterday and got what I interpreted to be your message structure working in IIBv9 using your schema and mqjeff's suggestion to handle the different elements. |
Thanks Vitor for spending your time on this and good to hear it worked in IIB.
Actually, this was one of the requirement I got from my peer who is working for other account. The requirement was to split the individual record (Header, Body and Trailer together) out of multiple records. So I though to parse it, and propagate based on the cardinality.
Though I thought this could be a simple DFDL structure, but got stuck with this error. So took another alternative by using ESQL string functions (Position, Substring and overlay) to split the record successfully (Yes, it may not be the best approach I admit).
So I was looking to see whether this was a known issue or limitation of DFDL from the experts here. I was suspecting it could be something to deal with the sequence separator suppression policy.
I will definitely give a try to check it out in IIB version and check the possibilities of raising a PMR as well. |
|
Back to top |
|
 |
vishnurajnr |
Posted: Fri Jul 31, 2015 6:27 pm Post subject: |
|
|
 Centurion
Joined: 08 Aug 2011 Posts: 134 Location: Trivandrum
|
Hi,
I figured out the way to model it successfully at last. I have removed the sequence separator (new line) and put it as the individual element terminator.
The DFDL is successfully parsing the message structure now..!!!
The modified XSD as below:
Code: |
<?xml version="1.0" encoding="UTF-8"?><xsd:schema xmlns:dfdl="http://www.ogf.org/dfdl/dfdl-1.0/" xmlns:ibmDfdlExtn="http://www.ibm.com/dfdl/extensions" xmlns:ibmSchExtn="http://www.ibm.com/schema/extensions" xmlns:recSepFieldsFmt="http://www.ibm.com/dfdl/RecordSeparatedFieldFormat" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:import namespace="http://www.ibm.com/dfdl/RecordSeparatedFieldFormat" schemaLocation="IBMdefined/RecordSeparatedFieldFormat.xsd"/>
<xsd:element ibmSchExtn:docRoot="true" name="Root">
<xsd:complexType>
<xsd:sequence dfdl:separator="">
<xsd:element dfdl:occursCountKind="implicit" maxOccurs="unbounded" name="SingleRec" type="SampleRecord"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:complexType name="SampleRecord">
<xsd:sequence dfdl:separator="" dfdl:terminator="">
<xsd:element dfdl:emptyValueDelimiterPolicy="none" dfdl:initiator="00H-" dfdl:length="10" dfdl:lengthKind="explicit" dfdl:representation="text" dfdl:terminator="%NL;" name="Header" type="xsd:string"/>
<xsd:element dfdl:emptyValueDelimiterPolicy="none" dfdl:initiator="00B1-" dfdl:length="10" dfdl:lengthKind="explicit" dfdl:occursCountKind="implicit" dfdl:representation="text" dfdl:terminator="%NL;" minOccurs="0" name="Body1" type="xsd:string"/>
<xsd:element dfdl:emptyValueDelimiterPolicy="none" dfdl:initiator="00B2-" dfdl:length="10" dfdl:lengthKind="explicit" dfdl:occursCountKind="implicit" dfdl:representation="text" dfdl:terminator="%NL;" minOccurs="0" name="Body2" type="xsd:string"/>
<xsd:element dfdl:emptyValueDelimiterPolicy="none" dfdl:initiator="00B3-" dfdl:length="10" dfdl:lengthKind="explicit" dfdl:nilValueDelimiterPolicy="none" dfdl:occursCountKind="implicit" dfdl:representation="text" dfdl:terminator="%NL;"maxOccurs="unbounded" minOccurs="0" name="Body3" type="xsd:string"/>
<xsd:element dfdl:emptyValueDelimiterPolicy="none" dfdl:initiator="00T1-" dfdl:length="10" dfdl:lengthKind="explicit" dfdl:representation="text" dfdl:terminator="%NL;" name="Tail" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
<xsd:annotation>
<xsd:appinfo source="http://www.ogf.org/dfdl/">
<dfdl:format byteOrder="{$dfdl:byteOrder}" encoding="US-ASCII" escapeSchemeRef="recSepFieldsFmt:RecordEscapeScheme" occursCountKind="fixed" ref="recSepFieldsFmt:RecordSeparatedFieldsFormat"/>
</xsd:appinfo>
</xsd:annotation>
</xsd:schema> |
Thank you all for your inputs and hints on deriving this.  |
|
Back to top |
|
 |
kimbert |
Posted: Sat Aug 01, 2015 9:11 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Nice work - glad you found the solution.
For the benefit of others who might read this thread in future - the OP's model should have worked, and this is definitely a defect. It is fixed in later versions of IBM DFDL. In the versions that ship with v8 ( at least up to v8.0.0.6 ) you should define line breaks as terminators, not as separators. _________________ 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 |
|
 |
|
|
 |
|
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
|
|
|
|