ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » DFDL : Fixed length/choice - Need a starting point

Post new topic  Reply to topic
 DFDL : Fixed length/choice - Need a starting point « View previous topic :: View next topic » 
Author Message
mk140589
PostPosted: Mon Jun 17, 2013 4:22 am    Post subject: DFDL : Fixed length/choice - Need a starting point Reply with quote

Novice

Joined: 17 Jun 2013
Posts: 20

Hi All,

I have looked at the tutorials concerning DFDL, but haven't got a real answer to the following case.

We want to parse a message which consists of several types of records.
Every record is ended with a %NL, so I can set the separator of my sequency to %NL, right?

Now starts the hard part :
Every record looks like the following :
Code:
[2-position int which only has to be stored for some records]
[Recordtype in 2 positions]
[Sequence number for cross-record reference in 3 positions]
[Subtype of record in 3 positions]
[Rest of data]


So, I'll give you a small example of the data which I need to parse (without the extra data) :
Code:
0000001000
0001001001
0003001003
0003002003
0007001007
0004001004
0004002105
0006001006
0123001023


Now, I thought I could build the following structure :
Code:
Sequence
     First field to store
     Choice on headtype
         Sequence number
         Choice on subtype


But this seems not as easy as I thought it would be.
Can someone help me to give a quick outline of how I can achieve something like this?

Many thanks to every comment,
Kind regards,
Maarten
Back to top
View user's profile Send private message
kimbert
PostPosted: Mon Jun 17, 2013 4:44 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
Every record is ended with a %NL, so I can set the separator of my sequency to %NL, right?
Correct

A couple of questions:
a) what happened when you tried this model
b) what were you expecting to happen ( presumably different from a) )

I think I can guess what's going wrong, but I don't want to make assumptions. I recommend that you try out your message using the DFDL test perspective in the toolkit. In fact, you probably did that already, but you did not look at the DFDL Trace view. The DFDL Trace will tell you exactly what the parser did with your model and test data. Take a look and see if it helps. Post again if you're still stuck.
Back to top
View user's profile Send private message
mk140589
PostPosted: Mon Jun 17, 2013 5:45 am    Post subject: Reply with quote

Novice

Joined: 17 Jun 2013
Posts: 20

I started a new model, to do this step-by-step.
The first thing that I want to do, is the split-up, which is already causing some problems.

The following xsd ran over the example that I've previously posted :
Code:
<?xml version="1.0" encoding="UTF-8"?><xsd:schema xmlns:dfdl="http://www.ogf.org/dfdl/dfdl-1.0/" xmlns:ibmSchExtn="http://www.ibm.com/schema/extensions" xmlns:recFixLengthFieldsFmt="http://www.ibm.com/dfdl/RecordFixLengthFieldFormat" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

    <xsd:import namespace="http://www.ibm.com/dfdl/RecordFixLengthFieldFormat" schemaLocation="IBMdefined/RecordFixLengthFieldFormat.xsd"/>
    <xsd:annotation>
      <xsd:appinfo source="http://www.ogf.org/dfdl/">
         <dfdl:format byteOrder="{$dfdl:byteOrder}" encoding="{$dfdl:encoding}" escapeSchemeRef="recFixLengthFieldsFmt:RecordEscapeScheme" occursCountKind="fixed" ref="recFixLengthFieldsFmt:RecordFixLengthFieldsFormat" separatorPolicy="suppressed"/>
      </xsd:appinfo>
   </xsd:annotation>

   <xsd:element dfdl:lengthKind="delimited" ibmSchExtn:docRoot="true" name="Trial">
      <xsd:complexType>
         <xsd:sequence maxOccurs="1">
            <xsd:element dfdl:lengthKind="implicit" dfdl:occursCountKind="implicit" dfdl:terminator="%NL;" maxOccurs="unbounded" name="Record">
               <xsd:complexType>
                  <xsd:sequence dfdl:separatorPolicy="suppressedAtEndLax">
                     <xsd:element dfdl:lengthKind="delimited" dfdl:occursCountKind="implicit" maxOccurs="1" name="Data" type="xsd:string"/>
                  </xsd:sequence>
               </xsd:complexType>
            </xsd:element>
         </xsd:sequence>
      </xsd:complexType>
   </xsd:element>


</xsd:schema>


This gave me the following output. (Error was at last line of parsed file) :
Code:


********************* DFDL Parser Setup Starting *********************
Schema = /IFTTOI/Trial.xsd
**********************************************************************

17 Jun 2013 15:41:23   info: Offset: 0. Root element 'Trial' identified.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial), 51]



********************* DFDL Parser Starting *********************
Data = /IFTTOI/rdy3
Message = Trial (/IFTTOI/Trial.xsd)
****************************************************************

17 Jun 2013 15:41:23   info: Offset: 0. Starting to process element 'Trial'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial), 55]

17 Jun 2013 15:41:23   info: Offset: 0. Up to '-1' occurrences of element 'Record' will be expected because occursCountKind='implicit' and maxOccurs='-1'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record), 133]

17 Jun 2013 15:41:23   info: Offset: 0. Starting to process element 'Record'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record), 56]

17 Jun 2013 15:41:23   info: Offset: 0. Starting to process element 'Data'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/schemaElement::Data), 54]

17 Jun 2013 15:41:23   info: Offset: 0. Found delimited value: '0000001000' for element 'Data'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/schemaElement::Data), 74]

17 Jun 2013 15:41:23   info: Offset: 11. Finished processing element 'Data'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/schemaElement::Data), 55]

17 Jun 2013 15:41:23   info: Offset: 11. Found terminator '%NL;' for element 'Record'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record), 65]

17 Jun 2013 15:41:23   info: Offset: 13. Finished processing element 'Record'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record), 57]

17 Jun 2013 15:41:23   info: Offset: 13. Optional element 'Record' encountered. The DFDL parser will return to this position if the element is not present in the data stream.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record), 153]

17 Jun 2013 15:41:23   info: Offset: 13. Starting to process element 'Record'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record), 57]

17 Jun 2013 15:41:23   info: Offset: 13. Starting to process element 'Data'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/schemaElement::Data), 55]

17 Jun 2013 15:41:23   info: Offset: 13. Found delimited value: '0001001001' for element 'Data'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/schemaElement::Data), 75]

17 Jun 2013 15:41:23   info: Offset: 24. Finished processing element 'Data'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/schemaElement::Data), 55]

17 Jun 2013 15:41:23   info: Offset: 24. Found terminator '%NL;' for element 'Record'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record), 65]

17 Jun 2013 15:41:23   info: Offset: 26. Finished processing element 'Record'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record), 57]

17 Jun 2013 15:41:23   info: Offset: 26. Optional element 'Record' encountered. The DFDL parser will return to this position if the element is not present in the data stream.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record), 153]

17 Jun 2013 15:41:23   info: Offset: 26. Starting to process element 'Record'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record), 57]

17 Jun 2013 15:41:23   info: Offset: 26. Starting to process element 'Data'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/schemaElement::Data), 55]

17 Jun 2013 15:41:23   info: Offset: 26. Found delimited value: '0003001003' for element 'Data'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/schemaElement::Data), 75]

17 Jun 2013 15:41:23   info: Offset: 37. Finished processing element 'Data'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/schemaElement::Data), 55]

17 Jun 2013 15:41:23   info: Offset: 37. Found terminator '%NL;' for element 'Record'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record), 65]

17 Jun 2013 15:41:23   info: Offset: 39. Finished processing element 'Record'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record), 57]

17 Jun 2013 15:41:23   info: Offset: 39. Optional element 'Record' encountered. The DFDL parser will return to this position if the element is not present in the data stream.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record), 153]

17 Jun 2013 15:41:23   info: Offset: 39. Starting to process element 'Record'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record), 57]

17 Jun 2013 15:41:23   info: Offset: 39. Starting to process element 'Data'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/schemaElement::Data), 55]

17 Jun 2013 15:41:23   info: Offset: 39. Found delimited value: '0003002003' for element 'Data'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/schemaElement::Data), 75]

17 Jun 2013 15:41:23   info: Offset: 50. Finished processing element 'Data'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/schemaElement::Data), 55]

17 Jun 2013 15:41:23   info: Offset: 50. Found terminator '%NL;' for element 'Record'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record), 65]

17 Jun 2013 15:41:23   info: Offset: 52. Finished processing element 'Record'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record), 57]

17 Jun 2013 15:41:23   info: Offset: 52. Optional element 'Record' encountered. The DFDL parser will return to this position if the element is not present in the data stream.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record), 153]

17 Jun 2013 15:41:23   info: Offset: 52. Starting to process element 'Record'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record), 57]

17 Jun 2013 15:41:23   info: Offset: 52. Starting to process element 'Data'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/schemaElement::Data), 55]

17 Jun 2013 15:41:23   info: Offset: 52. Found delimited value: '0007001007' for element 'Data'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/schemaElement::Data), 75]

17 Jun 2013 15:41:23   info: Offset: 63. Finished processing element 'Data'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/schemaElement::Data), 55]

17 Jun 2013 15:41:23   info: Offset: 63. Found terminator '%NL;' for element 'Record'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record), 65]

17 Jun 2013 15:41:23   info: Offset: 65. Finished processing element 'Record'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record), 57]

17 Jun 2013 15:41:23   info: Offset: 65. Optional element 'Record' encountered. The DFDL parser will return to this position if the element is not present in the data stream.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record), 153]

17 Jun 2013 15:41:23   info: Offset: 65. Starting to process element 'Record'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record), 57]

17 Jun 2013 15:41:23   info: Offset: 65. Starting to process element 'Data'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/schemaElement::Data), 55]

17 Jun 2013 15:41:23   info: Offset: 65. Found delimited value: '0004001004' for element 'Data'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/schemaElement::Data), 75]

17 Jun 2013 15:41:23   info: Offset: 76. Finished processing element 'Data'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/schemaElement::Data), 55]

17 Jun 2013 15:41:23   info: Offset: 76. Found terminator '%NL;' for element 'Record'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record), 65]

17 Jun 2013 15:41:23   info: Offset: 78. Finished processing element 'Record'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record), 57]

17 Jun 2013 15:41:23   info: Offset: 78. Optional element 'Record' encountered. The DFDL parser will return to this position if the element is not present in the data stream.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record), 153]

17 Jun 2013 15:41:23   info: Offset: 78. Starting to process element 'Record'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record), 57]

17 Jun 2013 15:41:23   info: Offset: 78. Starting to process element 'Data'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/schemaElement::Data), 55]

17 Jun 2013 15:41:23   info: Offset: 78. Found delimited value: '0004002105' for element 'Data'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/schemaElement::Data), 75]

17 Jun 2013 15:41:23   info: Offset: 89. Finished processing element 'Data'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/schemaElement::Data), 55]

17 Jun 2013 15:41:23   info: Offset: 89. Found terminator '%NL;' for element 'Record'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record), 65]

17 Jun 2013 15:41:23   info: Offset: 91. Finished processing element 'Record'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record), 57]

17 Jun 2013 15:41:23   info: Offset: 91. Optional element 'Record' encountered. The DFDL parser will return to this position if the element is not present in the data stream.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record), 153]

17 Jun 2013 15:41:23   info: Offset: 91. Starting to process element 'Record'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record), 57]

17 Jun 2013 15:41:23   info: Offset: 91. Starting to process element 'Data'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/schemaElement::Data), 55]

17 Jun 2013 15:41:23   info: Offset: 91. Found delimited value: '0006001006' for element 'Data'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/schemaElement::Data), 75]

17 Jun 2013 15:41:23   info: Offset: 102. Finished processing element 'Data'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/schemaElement::Data), 56]

17 Jun 2013 15:41:23   info: Offset: 102. Found terminator '%NL;' for element 'Record'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record), 66]

17 Jun 2013 15:41:23   info: Offset: 104. Finished processing element 'Record'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record), 58]

17 Jun 2013 15:41:23   info: Offset: 104. Optional element 'Record' encountered. The DFDL parser will return to this position if the element is not present in the data stream.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record), 154]

17 Jun 2013 15:41:23   info: Offset: 104. Starting to process element 'Record'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record), 58]

17 Jun 2013 15:41:23   info: Offset: 104. Starting to process element 'Data'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/schemaElement::Data), 56]

17 Jun 2013 15:41:23   info: Offset: 104. Found delimited value: '0123001023' for element 'Data'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/schemaElement::Data), 76]

17 Jun 2013 15:41:23   info: Offset: 115. Finished processing element 'Data'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/schemaElement::Data), 56]

17 Jun 2013 15:41:23   info: Offset: 115. Did not find terminator for 'Record'.  Expected terminator list is '%NL;'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record), 95]

17 Jun 2013 15:41:23   error: CTDP3042E: Terminator is missing for element 'Record'.

17 Jun 2013 15:41:23   info: offset: 115. Parser was unable to resolve data on the current branch and will evaluate the next available branch beginning at offset '115' owned by the 'sequence' group contained within element 'Trial'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence), 210]

17 Jun 2013 15:41:23   info: Offset: 104. Occurrence '9' of element 'Record' was not found in the data. occursCountKind is 'parsed' so no more occurrences of this element will be expected.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record), 168]

17 Jun 2013 15:41:23   info: Offset: 104. Finished processing element 'Trial'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial), 57]

17 Jun 2013 15:41:23   fatal: CTDP3002E: Unexpected data found at offset '104' after parsing completed. Data: '0x30...'.


I suppose that the missing of an %NL; as a terminator for the last line is the reason why I get this error, so I need to cope with this.
Using the help of IBM, I added %ETX; to the terminator of the Record-element, but this didn't help.

Thanks for your effort,
Kind regards,
Maarten
Back to top
View user's profile Send private message
mk140589
PostPosted: Mon Jun 17, 2013 6:01 am    Post subject: Reply with quote

Novice

Joined: 17 Jun 2013
Posts: 20

OK, found the solution to my previous post.
I've set the separator of the sequence above Record to be %NL; and deleted the terminator of the Record-element.

Going to try the choice between main Types.
Back to top
View user's profile Send private message
mk140589
PostPosted: Mon Jun 17, 2013 6:42 am    Post subject: Reply with quote

Novice

Joined: 17 Jun 2013
Posts: 20

Used to following XSD to parse the example from the first post :
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:recFixLengthFieldsFmt="http://www.ibm.com/dfdl/RecordFixLengthFieldFormat" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

    <xsd:import namespace="http://www.ibm.com/dfdl/RecordFixLengthFieldFormat" schemaLocation="IBMdefined/RecordFixLengthFieldFormat.xsd"/>
    <xsd:annotation>
      <xsd:appinfo source="http://www.ogf.org/dfdl/">
         <dfdl:format byteOrder="{$dfdl:byteOrder}" encoding="{$dfdl:encoding}" escapeSchemeRef="recFixLengthFieldsFmt:RecordEscapeScheme" occursCountKind="fixed" ref="recFixLengthFieldsFmt:RecordFixLengthFieldsFormat" separatorPolicy="suppressed"/>
      </xsd:appinfo>
   </xsd:annotation>

   <xsd:element dfdl:lengthKind="delimited" ibmSchExtn:docRoot="true" name="Trial">
      <xsd:complexType>
         <xsd:sequence dfdl:separator="%NL;" maxOccurs="1">
            <xsd:element dfdl:lengthKind="implicit" dfdl:occursCountKind="implicit" dfdl:terminator="" maxOccurs="unbounded" name="Record">
               <xsd:complexType>
                  <xsd:sequence dfdl:separatorPolicy="suppressedAtEndLax">
                     <xsd:element dfdl:length="2" dfdl:lengthKind="explicit" dfdl:lengthUnits="characters" dfdl:occursCountKind="implicit" ibmDfdlExtn:sampleValue="aa" maxOccurs="1" name="TDT" type="xsd:string"/>
                                              <xsd:choice>
                <xsd:element dfdl:initiator="00" dfdl:lengthKind="delimited" name="HREC00">
                  <xsd:complexType>
                    <xsd:sequence>
                      <xsd:element dfdl:length="3" dfdl:lengthUnits="characters" ibmDfdlExtn:sampleValue="aaa" name="SEQNBR" type="xsd:string"/>
                      <xsd:element dfdl:lengthKind="delimited" name="Data" type="xsd:string"/>
                    </xsd:sequence>
                  </xsd:complexType>
                </xsd:element>
                <xsd:element dfdl:initiator="01" dfdl:lengthKind="delimited" name="HREC01">
                  <xsd:complexType>
                    <xsd:sequence>
                      <xsd:element dfdl:length="3" dfdl:lengthUnits="characters" ibmDfdlExtn:sampleValue="aaa" name="SEQNBR" type="xsd:string"/>
                      <xsd:element dfdl:lengthKind="delimited" name="Data" type="xsd:string"/>
                    </xsd:sequence>
                  </xsd:complexType>
                </xsd:element>
                <xsd:element dfdl:initiator="03" dfdl:lengthKind="delimited" dfdl:occursCountKind="implicit" maxOccurs="unbounded" name="HREC03">
                  <xsd:complexType>
                    <xsd:sequence>
                      <xsd:element dfdl:length="3" dfdl:lengthUnits="characters" ibmDfdlExtn:sampleValue="aaa" name="SEQNBR" type="xsd:string"/>
                      <xsd:element dfdl:lengthKind="delimited" name="Data" type="xsd:string"/>
                    </xsd:sequence>
                  </xsd:complexType>
                </xsd:element>
                <xsd:element dfdl:initiator="07" dfdl:lengthKind="delimited" dfdl:occursCountKind="implicit" maxOccurs="unbounded" name="HREC07">
                  <xsd:complexType>
                    <xsd:sequence>
                      <xsd:element dfdl:length="3" dfdl:lengthUnits="characters" ibmDfdlExtn:sampleValue="aaa" name="SEQNBR" type="xsd:string"/>
                      <xsd:element dfdl:lengthKind="delimited" name="Data" type="xsd:string"/>
                    </xsd:sequence>
                  </xsd:complexType>
                </xsd:element>
                <xsd:element dfdl:initiator="04" dfdl:lengthKind="delimited" dfdl:occursCountKind="implicit" maxOccurs="unbounded" name="HREC04">
                  <xsd:complexType>
                    <xsd:sequence>
                      <xsd:element dfdl:length="3" dfdl:lengthUnits="characters" ibmDfdlExtn:sampleValue="aaa" name="SEQNBR" type="xsd:string"/>
                      <xsd:choice>
                        <xsd:element dfdl:initiator="004" dfdl:lengthKind="delimited" name="SREC4" type="xsd:string"/>
                        <xsd:element dfdl:initiator="105" dfdl:lengthKind="delimited" name="SREC5" type="xsd:string"/>
                      </xsd:choice>
                    </xsd:sequence>
                  </xsd:complexType>
                </xsd:element>
                <xsd:element dfdl:initiator="06" dfdl:lengthKind="delimited" dfdl:occursCountKind="implicit" maxOccurs="unbounded" name="HREC06">
                  <xsd:complexType>
                    <xsd:sequence>
                      <xsd:element dfdl:length="3" dfdl:lengthUnits="characters" ibmDfdlExtn:sampleValue="aaa" name="SEQNBR" type="xsd:string"/>
                      <xsd:element dfdl:lengthKind="delimited" name="Data" type="xsd:string"/>
                    </xsd:sequence>
                  </xsd:complexType>
                </xsd:element>
                <xsd:element dfdl:initiator="23" dfdl:lengthKind="delimited" dfdl:occursCountKind="implicit" maxOccurs="unbounded" name="HREC23">
                  <xsd:complexType>
                    <xsd:sequence>
                      <xsd:element dfdl:length="3" dfdl:lengthUnits="characters" ibmDfdlExtn:sampleValue="aaa" name="SEQNBR" type="xsd:string"/>
                      <xsd:element dfdl:lengthKind="delimited" name="Data" type="xsd:string"/>
                    </xsd:sequence>
                  </xsd:complexType>
                </xsd:element>
              </xsd:choice>
                        </xsd:sequence>
               </xsd:complexType>
            </xsd:element>
         </xsd:sequence>
      </xsd:complexType>
   </xsd:element>


</xsd:schema>


But when I tried a real life example, like the following :
Code:
0000001000880003000561INTRA64001IFTTOI-902-1-0     0VW3  119610549               201304291149  VW     61054
00010010012   00000000000   00000000000   00000000000   00000000000   0000000000000   0000000000053672343     00000000000                               900000000                                       00000000000                                 0000  25Via Montzen / Aachen West                                                     00000000000                                                                                                                                                                                                                            00000000000                                                                                                                                                                                                        000000000000                                         
0003001003CZ 880002001290000    AUDI BRUSSELS S.A./N.V.                 201, BD DE LA 2 ème ARMEE BRITANNIQUE   BRUXELLES                          1190     88                          (02).348.23.74           (02).348.26.65                                                       407687238                                                                                                                                                                                                               
0003002003CN 800000000000000    DB Schenker Rail Automotive Gmbh/ATG    Langer Kornweg 34 I                     Kelsterbach                        65451    DE                                                                                                                                                                                                                                                                                                                                                 
0007001007001
0004001004001                      0000BE DE 0000000000000000000000000000000000000000000000        0014640                                    0              000008703001   WAGON                                                             12 AUTO 1                                                             12 AUTO 2                                                             12 AUTO 3                                                             12 AUTO 4                                                             FR                                                                                                                                                                                                                                                                                                                                                                      00                                                                                                   
00040021052580436729420014640
0006001006RR258043672942   10101464000000000000000000000000000                                                                                                 
01230010235  88143735FOREST-MIDI                               11105                             
012300202317 8800000Via Montzen / Aachen West                                                     
02230010238  8063769Emden / Terminal  Evag                00000                                   


It only identifies the 2 first records.
The following is the stack trace :
Code:


********************* DFDL Parser Setup Starting *********************
Schema = /IFTTOI/Trial.xsd
**********************************************************************

17 Jun 2013 16:40:39   info: Offset: 0. Root element 'Trial' identified.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial), 51]



********************* DFDL Parser Starting *********************
Data = /IFTTOI/rdy1
Message = Trial (/IFTTOI/Trial.xsd)
****************************************************************

17 Jun 2013 16:40:39   info: Offset: 0. Starting to process element 'Trial'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial), 55]

17 Jun 2013 16:40:39   info: Offset: 0. Up to '-1' occurrences of element 'Record' will be expected because occursCountKind='implicit' and maxOccurs='-1'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record), 133]

17 Jun 2013 16:40:39   info: Offset: 0. Starting to process element 'Record'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record), 56]

17 Jun 2013 16:40:39   info: Offset: 0. Starting to process element 'TDT'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/schemaElement::TDT), 53]

17 Jun 2013 16:40:39   info: Offset: 0. Found fixed length value: '00' for element 'TDT'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/schemaElement::TDT), 68]

17 Jun 2013 16:40:39   info: Offset: 2. Finished processing element 'TDT'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/schemaElement::TDT), 53]

17 Jun 2013 16:40:39   info: Offset: 2. Choice branch 'HREC00' encountered. The DFDL parser will return to this position if this branch of the choice is not found in the data stream.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC00), 161]

17 Jun 2013 16:40:39   info: Offset: 2. Starting to process element 'HREC00'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC00), 56]

17 Jun 2013 16:40:39   info: Offset: 2. Found initiator '00' for element 'HREC00'
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC00), 60]

17 Jun 2013 16:40:39   info: Offset: 4. Starting to process element 'SEQNBR'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC00/type::0/model::sequence/schemaElement::SEQNBR), 56]

17 Jun 2013 16:40:39   info: Offset: 4. Found fixed length value: '001' for element 'SEQNBR'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC00/type::0/model::sequence/schemaElement::SEQNBR), 72]

17 Jun 2013 16:40:39   info: Offset: 7. Finished processing element 'SEQNBR'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC00/type::0/model::sequence/schemaElement::SEQNBR), 56]

17 Jun 2013 16:40:39   info: Offset: 7. Starting to process element 'Data'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC00/type::0/model::sequence/schemaElement::Data), 54]

17 Jun 2013 16:40:39   info: Offset: 7. Found delimited value: '000880003000561INTRA64001IFTTOI-902-1-0     0VW3  119610549               201304291149  VW     61054' for element 'Data'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC00/type::0/model::sequence/schemaElement::Data), 164]

17 Jun 2013 16:40:39   info: Offset: 107. Finished processing element 'Data'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC00/type::0/model::sequence/schemaElement::Data), 56]

17 Jun 2013 16:40:39   info: Offset: 107. Finished processing element 'HREC00'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC00), 58]

17 Jun 2013 16:40:39   info: Offset: 107. Finished processing element 'Record'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record), 58]

17 Jun 2013 16:40:39   info: Offset: 107. Optional element 'Record' encountered. The DFDL parser will return to this position if the element is not present in the data stream.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record), 154]

17 Jun 2013 16:40:39   info: Offset: 107. Found separator '%NL;' owned by the 'sequence' group contained within element 'Trial'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence), 107]

17 Jun 2013 16:40:39   info: Offset: 109. Starting to process element 'Record'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record), 58]

17 Jun 2013 16:40:39   info: Offset: 109. Starting to process element 'TDT'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/schemaElement::TDT), 55]

17 Jun 2013 16:40:39   info: Offset: 109. Found fixed length value: '00' for element 'TDT'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/schemaElement::TDT), 70]

17 Jun 2013 16:40:39   info: Offset: 111. Finished processing element 'TDT'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/schemaElement::TDT), 55]

17 Jun 2013 16:40:39   info: Offset: 111. Choice branch 'HREC00' encountered. The DFDL parser will return to this position if this branch of the choice is not found in the data stream.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC00), 163]

17 Jun 2013 16:40:39   info: Offset: 111. Starting to process element 'HREC00'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC00), 58]

17 Jun 2013 16:40:39   info: Offset: 111. Did not find initiator for 'HREC00'
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC00), 56]

17 Jun 2013 16:40:39   info: Offset: 111. Element 'HREC00' is missing because the initiator was not found in the data stream.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC00), 104]

17 Jun 2013 16:40:39   info: Offset: 111. Element 'HREC00' is missing because the initiator was not found in the data stream.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC00), 104]

17 Jun 2013 16:40:39   error: CTDP3041E: Initiator is missing for element 'HREC00'.

17 Jun 2013 16:40:39   info: offset: 111. Parser was unable to resolve data on the current branch and will evaluate the next available branch beginning at offset '111' owned by the 'choice' group contained within element 'sequence'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice), 211]

17 Jun 2013 16:40:39   info: Offset: 111. Choice branch 'HREC01' encountered. The DFDL parser will return to this position if this branch of the choice is not found in the data stream.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC01), 163]

17 Jun 2013 16:40:39   info: Offset: 111. Starting to process element 'HREC01'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC01), 58]

17 Jun 2013 16:40:39   info: Offset: 111. Found initiator '01' for element 'HREC01'
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC01), 62]

17 Jun 2013 16:40:39   info: Offset: 113. Starting to process element 'SEQNBR'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC01/type::0/model::sequence/schemaElement::SEQNBR), 58]

17 Jun 2013 16:40:39   info: Offset: 113. Found fixed length value: '001' for element 'SEQNBR'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC01/type::0/model::sequence/schemaElement::SEQNBR), 74]

17 Jun 2013 16:40:39   info: Offset: 116. Finished processing element 'SEQNBR'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC01/type::0/model::sequence/schemaElement::SEQNBR), 58]

17 Jun 2013 16:40:39   info: Offset: 116. Starting to process element 'Data'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC01/type::0/model::sequence/schemaElement::Data), 56]

17 Jun 2013 16:40:39   info: Offset: 116. Found delimited value: '0012   00000000000   00000000000   00000000000   00000000000   0000000000000   0000000000053672343     00000000000                               900000000                                       00000000000                                 0000  25Via Montzen / Aachen West                                                     00000000000                                                                                                                                                                                                                            00000000000                                                                                                                                                                                                        000000000000' for element 'Data'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC01/type::0/model::sequence/schemaElement::Data), 843]

17 Jun 2013 16:40:39   info: Offset: 934. Finished processing element 'Data'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC01/type::0/model::sequence/schemaElement::Data), 56]

17 Jun 2013 16:40:39   info: Offset: 934. Finished processing element 'HREC01'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC01), 58]

17 Jun 2013 16:40:39   info: Offset: 934. Finished processing element 'Record'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record), 58]

17 Jun 2013 16:40:39   info: Offset: 934. Optional element 'Record' encountered. The DFDL parser will return to this position if the element is not present in the data stream.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record), 154]

17 Jun 2013 16:40:39   info: Offset: 934. Found separator '%NL;' owned by the 'sequence' group contained within element 'Trial'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence), 107]

17 Jun 2013 16:40:39   info: Offset: 936. Starting to process element 'Record'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record), 58]

17 Jun 2013 16:40:39   info: Offset: 936. Starting to process element 'TDT'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/schemaElement::TDT), 55]

17 Jun 2013 16:40:39   info: Offset: 936. Found fixed length value: '00' for element 'TDT'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/schemaElement::TDT), 70]

17 Jun 2013 16:40:39   info: Offset: 938. Finished processing element 'TDT'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/schemaElement::TDT), 55]

17 Jun 2013 16:40:39   info: Offset: 938. Choice branch 'HREC00' encountered. The DFDL parser will return to this position if this branch of the choice is not found in the data stream.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC00), 163]

17 Jun 2013 16:40:39   info: Offset: 938. Starting to process element 'HREC00'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC00), 58]

17 Jun 2013 16:40:39   info: Offset: 938. Did not find initiator for 'HREC00'
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC00), 56]

17 Jun 2013 16:40:39   info: Offset: 938. Element 'HREC00' is missing because the initiator was not found in the data stream.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC00), 104]

17 Jun 2013 16:40:39   info: Offset: 938. Element 'HREC00' is missing because the initiator was not found in the data stream.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC00), 104]

17 Jun 2013 16:40:39   error: CTDP3041E: Initiator is missing for element 'HREC00'.

17 Jun 2013 16:40:39   info: offset: 938. Parser was unable to resolve data on the current branch and will evaluate the next available branch beginning at offset '938' owned by the 'choice' group contained within element 'sequence'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice), 211]

17 Jun 2013 16:40:39   info: Offset: 938. Choice branch 'HREC01' encountered. The DFDL parser will return to this position if this branch of the choice is not found in the data stream.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC01), 163]

17 Jun 2013 16:40:39   info: Offset: 938. Starting to process element 'HREC01'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC01), 58]

17 Jun 2013 16:40:39   info: Offset: 938. Did not find initiator for 'HREC01'
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC01), 56]

17 Jun 2013 16:40:39   info: Offset: 938. Element 'HREC01' is missing because the initiator was not found in the data stream.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC01), 104]

17 Jun 2013 16:40:39   info: Offset: 938. Element 'HREC01' is missing because the initiator was not found in the data stream.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC01), 104]

17 Jun 2013 16:40:39   error: CTDP3041E: Initiator is missing for element 'HREC01'.

17 Jun 2013 16:40:39   info: offset: 938. Parser was unable to resolve data on the current branch and will evaluate the next available branch beginning at offset '938' owned by the 'choice' group contained within element 'sequence'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice), 211]

17 Jun 2013 16:40:39   info: Offset: 938. Choice branch 'HREC03' encountered. The DFDL parser will return to this position if this branch of the choice is not found in the data stream.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC03), 163]

17 Jun 2013 16:40:39   info: Offset: 938. Up to '-1' occurrences of element 'HREC03' will be expected because occursCountKind='implicit' and maxOccurs='-1'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC03), 135]

17 Jun 2013 16:40:39   info: Offset: 938. Starting to process element 'HREC03'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC03), 58]

17 Jun 2013 16:40:39   info: Offset: 938. Found initiator '03' for element 'HREC03'
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC03), 62]

17 Jun 2013 16:40:39   info: Offset: 940. Starting to process element 'SEQNBR'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC03/type::0/model::sequence/schemaElement::SEQNBR), 58]

17 Jun 2013 16:40:39   info: Offset: 940. Found fixed length value: '001' for element 'SEQNBR'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC03/type::0/model::sequence/schemaElement::SEQNBR), 74]

17 Jun 2013 16:40:39   info: Offset: 943. Finished processing element 'SEQNBR'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC03/type::0/model::sequence/schemaElement::SEQNBR), 58]

17 Jun 2013 16:40:39   info: Offset: 943. Starting to process element 'Data'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC03/type::0/model::sequence/schemaElement::Data), 56]

17 Jun 2013 16:40:39   error: CTDP3011E: Character decoding error 'Malformed input or unmappable character' in element 'UTF-8'.

17 Jun 2013 16:40:39   info: offset: 1431. Parser was unable to resolve data on the current branch and will evaluate the next available branch beginning at offset '1431' owned by the 'choice' group contained within element 'sequence'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice), 213]

17 Jun 2013 16:40:39   info: Offset: 938. Choice branch 'HREC07' encountered. The DFDL parser will return to this position if this branch of the choice is not found in the data stream.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC07), 163]

17 Jun 2013 16:40:39   info: Offset: 938. Up to '-1' occurrences of element 'HREC07' will be expected because occursCountKind='implicit' and maxOccurs='-1'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC07), 135]

17 Jun 2013 16:40:39   info: Offset: 938. Starting to process element 'HREC07'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC07), 58]

17 Jun 2013 16:40:39   info: Offset: 938. Did not find initiator for 'HREC07'
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC07), 56]

17 Jun 2013 16:40:39   info: Offset: 938. Element 'HREC07' is missing because the initiator was not found in the data stream.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC07), 104]

17 Jun 2013 16:40:39   info: Offset: 938. Element 'HREC07' is missing because the initiator was not found in the data stream.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC07), 104]

17 Jun 2013 16:40:39   error: CTDP3041E: Initiator is missing for element 'HREC07'.

17 Jun 2013 16:40:39   info: offset: 938. Parser was unable to resolve data on the current branch and will evaluate the next available branch beginning at offset '938' owned by the 'choice' group contained within element 'sequence'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice), 211]

17 Jun 2013 16:40:39   info: Offset: 938. Choice branch 'HREC04' encountered. The DFDL parser will return to this position if this branch of the choice is not found in the data stream.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC04), 163]

17 Jun 2013 16:40:39   info: Offset: 938. Up to '-1' occurrences of element 'HREC04' will be expected because occursCountKind='implicit' and maxOccurs='-1'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC04), 135]

17 Jun 2013 16:40:39   info: Offset: 938. Starting to process element 'HREC04'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC04), 58]

17 Jun 2013 16:40:39   info: Offset: 938. Did not find initiator for 'HREC04'
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC04), 56]

17 Jun 2013 16:40:39   info: Offset: 938. Element 'HREC04' is missing because the initiator was not found in the data stream.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC04), 104]

17 Jun 2013 16:40:39   info: Offset: 938. Element 'HREC04' is missing because the initiator was not found in the data stream.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC04), 104]

17 Jun 2013 16:40:39   error: CTDP3041E: Initiator is missing for element 'HREC04'.

17 Jun 2013 16:40:39   info: offset: 938. Parser was unable to resolve data on the current branch and will evaluate the next available branch beginning at offset '938' owned by the 'choice' group contained within element 'sequence'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice), 211]

17 Jun 2013 16:40:39   info: Offset: 938. Choice branch 'HREC06' encountered. The DFDL parser will return to this position if this branch of the choice is not found in the data stream.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC06), 163]

17 Jun 2013 16:40:39   info: Offset: 938. Up to '-1' occurrences of element 'HREC06' will be expected because occursCountKind='implicit' and maxOccurs='-1'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC06), 135]

17 Jun 2013 16:40:39   info: Offset: 938. Starting to process element 'HREC06'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC06), 58]

17 Jun 2013 16:40:39   info: Offset: 938. Did not find initiator for 'HREC06'
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC06), 56]

17 Jun 2013 16:40:39   info: Offset: 938. Element 'HREC06' is missing because the initiator was not found in the data stream.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC06), 104]

17 Jun 2013 16:40:39   info: Offset: 938. Element 'HREC06' is missing because the initiator was not found in the data stream.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC06), 104]

17 Jun 2013 16:40:39   error: CTDP3041E: Initiator is missing for element 'HREC06'.

17 Jun 2013 16:40:39   info: offset: 938. Parser was unable to resolve data on the current branch and will evaluate the next available branch beginning at offset '938' owned by the 'choice' group contained within element 'sequence'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice), 211]

17 Jun 2013 16:40:39   info: Offset: 938. Choice branch 'HREC23' encountered. The DFDL parser will return to this position if this branch of the choice is not found in the data stream.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC23), 163]

17 Jun 2013 16:40:39   info: Offset: 938. Up to '-1' occurrences of element 'HREC23' will be expected because occursCountKind='implicit' and maxOccurs='-1'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC23), 135]

17 Jun 2013 16:40:39   info: Offset: 938. Starting to process element 'HREC23'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC23), 58]

17 Jun 2013 16:40:39   info: Offset: 938. Did not find initiator for 'HREC23'
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC23), 56]

17 Jun 2013 16:40:39   info: Offset: 938. Element 'HREC23' is missing because the initiator was not found in the data stream.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC23), 104]

17 Jun 2013 16:40:39   info: Offset: 938. Element 'HREC23' is missing because the initiator was not found in the data stream.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC23), 104]

17 Jun 2013 16:40:39   error: CTDP3041E: Initiator is missing for element 'HREC23'.

17 Jun 2013 16:40:39   info: offset: 938. Parser was unable to resolve data on the current branch and will evaluate the next available branch beginning at offset '938' owned by the 'choice' group contained within element 'sequence'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice), 211]

17 Jun 2013 16:40:39   error: CTDP3104E: None of the branches of the choice group under element 'sequence' were found in the input data at offset '938'.

17 Jun 2013 16:40:39   info: offset: 938. Parser was unable to resolve data on the current branch and will evaluate the next available branch beginning at offset '938' owned by the 'sequence' group contained within element 'Trial'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence), 210]

17 Jun 2013 16:40:39   info: Offset: 934. Occurrence '3' of element 'Record' was not found in the data. occursCountKind is 'parsed' so no more occurrences of this element will be expected.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record), 168]



Any idea as to why it can't identify the 3rd line?

Thanks,
Regards,
Maarten
Back to top
View user's profile Send private message
kimbert
PostPosted: Mon Jun 17, 2013 7:28 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
OK, found the solution to my previous post.
I've set the separator of the sequence above Record to be %NL; and deleted the terminator of the Record-element.
That will make your test data work, but now your model will break if the final record *does* have a newline.
DFDL provides a property that allows the final terminator to be missing. I suggest that you change the model back, and set 'finalTerminatorCanBeMissing' to 'yes' in the global format block ( the one in the schema-level annotation ).
Back to top
View user's profile Send private message
kimbert
PostPosted: Mon Jun 17, 2013 7:34 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
Any idea as to why it can't identify the 3rd line?
From reading the trace, I would guess that the two characters starting at offset 938 do not match any of the initiators in your choice group. You are definitely on the right track, so I suggest that you experiment a little bit more.

Code:
<dfdl:format byteOrder="{$dfdl:byteOrder}" encoding="{$dfdl:encoding}"
Your model is picking up the byte order and encoding from the transport. If you are using MQ, and you expect the CCSID or the encoding to change then that's OK. But you don't need the flexibility then you will get slightly better performance by hard-coding those values in your DFDL xsd.
Back to top
View user's profile Send private message
mk140589
PostPosted: Mon Jun 17, 2013 7:41 am    Post subject: Reply with quote

Novice

Joined: 17 Jun 2013
Posts: 20

Quote:
That will make your test data work, but now your model will break if the final record *does* have a newline.
DFDL provides a property that allows the final terminator to be missing. I suggest that you change the model back, and set 'finalTerminatorCanBeMissing' to 'yes' in the global format block ( the one in the schema-level annotation ).

Is it possible that I can't change this setting in the DFDL Editor and can only change it in the schema?
If yes, where should I do this.
I tried to do it in the upper annotation block, but this wasn't reflected on the read-only value that I found in the DFDL Editor.

Quote:
From reading the trace, I would guess that the two characters starting at offset 938 do not match any of the initiators in your choice group. You are definitely on the right track, so I suggest that you experiment a little bit more.

That was my thought also, but when I look at the offset, it is '03' which is the same as my initiator for HREC03.

Quote:
Your model is picking up the byte order and encoding from the transport. If you are using MQ, and you expect the CCSID or the encoding to change then that's OK. But you don't need the flexibility then you will get slightly better performance by hard-coding those values in your DFDL xsd.

Thanks for the tip.
Back to top
View user's profile Send private message
kimbert
PostPosted: Mon Jun 17, 2013 7:47 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
That was my thought also, but when I look at the offset, it is '03' which is the same as my initiator for HREC03.
Set maxOccurs to 2 on the Record element, then add a 2-character field after it. Inspect the DFDL trace to see what the DFDL parser is seeing.
Back to top
View user's profile Send private message
mk140589
PostPosted: Mon Jun 17, 2013 8:12 am    Post subject: Reply with quote

Novice

Joined: 17 Jun 2013
Posts: 20

I took 4 characters, because WMB was breaking on 934 when it can't find a resolution for 938.

The stacktrace is the following. (only took the relevant part, because this post is already getting big)
Code:
17 Jun 2013 18:09:49   info: Offset: 934. Finished processing element 'HREC01'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC01), 58]

17 Jun 2013 18:09:49   info: Offset: 934. Finished processing element 'Record'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record), 58]

17 Jun 2013 18:09:49   info: Offset: 934. Found separator '%NL;' owned by the 'sequence' group contained within element 'Trial'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence), 107]

17 Jun 2013 18:09:49   info: Offset: 936. Starting to process element 'field1'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::field1), 58]

17 Jun 2013 18:09:49   info: Offset: 936. Found fixed length value: '0003' for element 'field1'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::field1), 75]
Back to top
View user's profile Send private message
mk140589
PostPosted: Mon Jun 17, 2013 8:36 am    Post subject: Reply with quote

Novice

Joined: 17 Jun 2013
Posts: 20

After some investigation, I saw the following line in my stack trace :
Code:
17 Jun 2013 18:28:21   info: Offset: 938. Found initiator '03' for element 'HREC03'
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC03), 62]

17 Jun 2013 18:28:21   info: Offset: 940. Starting to process element 'SEQNBR'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC03/type::0/model::sequence/schemaElement::SEQNBR), 58]

17 Jun 2013 18:28:21   info: Offset: 940. Found fixed length value: '001' for element 'SEQNBR'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC03/type::0/model::sequence/schemaElement::SEQNBR), 74]

17 Jun 2013 18:28:21   info: Offset: 943. Finished processing element 'SEQNBR'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC03/type::0/model::sequence/schemaElement::SEQNBR), 58]

17 Jun 2013 18:28:21   info: Offset: 943. Starting to process element 'Data'.
                       [dfdl = /IFTTOI/Trial.xsd, scd = #xscd(/schemaElement::Trial/type::0/model::sequence/schemaElement::Record/type::0/model::sequence/model::choice/schemaElement::HREC03/type::0/model::sequence/schemaElement::Data), 56]

17 Jun 2013 18:28:21   error: CTDP3011E: Character decoding error 'Malformed input or unmappable character' in element 'UTF-8'.


After changing the encoding to ISO-8859-1, it worked like a charm.

The only thing that I still need to do, is changing the separator/terminator, but I need some help as where to set the finalTerminatorCanBeMissing="yes".

Thanks for your awesome help, because I really learned some valuable things about DFDL today that weren't in the tutorials.
Kind regards,
Maarten
Back to top
View user's profile Send private message
kimbert
PostPosted: Tue Jun 18, 2013 3:39 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

You can set the 'documentFinalTerminatorCanBeMissing' property as follows:

- Click the 'Show all sections' button at the top of the DFDL editor
- Find the 'Data Formats' section
- Click on the <default format> entry
- You should now see the full set of DFDL properties display in the 'Representation properties' view on the right hand side.
- Find the 'Delimiters' section. The property 'DocumentFinalTerminatorCanBeMissing' is listed there.

After changing the property and saving, feel free to look at the xsd in a text editor. You should find that the anonymous format block for the schema has been changed to include the new property.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » DFDL : Fixed length/choice - Need a starting point
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.