
Part of Action 086 is to apply the clarified Nils and Defaulting rules to complex elements and develop some examples. The tables for parsing and unparsing are simpler because there is no need to consider nillable. I have assumed - emptyValueDelimiterPolicy does apply to complex elements. - on parsing a complex element is empty if its children's content is empty. That is the child delimiters may be present. - on unparsing defaulting occurs if a complex item is missing or present present but has no children. Defaulting for complex elements on parsing initiator region content region Logical Value matching Not empty parsed children matching empty A default is specified emptyValueDelimiterPolicy must be initiator or both default value of children empty Not empty Initiator must not be specified parsed children empty empty A default is specified emptyValueDelimiterPolicy must be none or Initiator must not be specified default value of children Defaulting for complex elements on unparsing Logical Value initiator region contains content region contains Missing or present with no children default of all children is empty string emptyValueDelimiterPolicy none empty empty emptyValueDelimiterPolicy initiator or both initiator string default of any child is not empty string initiator string representation of the child default value. a least on child exists initiator string representation of children Examples Defaulting Complex types ONE:one, TWO: TWOONE:twoone; TWOTWO:twotwo; TWOTHREE:twothree, THREE:three <end> In the following TWO is 'empty' (when relevant dfdl properties are set) ONE:one,THREE:three<end> |separatorPolicy='suppressed', emptyValueDelimiterPolicy='none' ONE:one,,THREE:three<end> separatorPolicy='required', emptyValueDelimiterPolicy='none' ONE:one<end> separatorPolicy='suppressed' or 'suppressedAtEnd', emptyValueDelimiterPolicy='none' <end> separatorPolicy='suppressed' or 'suppressedAtEnd', emptyValueDelimiterPolicy='none' ONE:one,TWO:,THREE:three<end> separatorPolicy= don't care , emptyValueDelimiterPolicy='initiator' ONE:one,TWO:<end> separatorPolicy= 'suppressed' or 'suppressedAtEnd', emptyValueDelimiterPolicy='initiator' ONE:one,TWO:,<end> separatorPosition='postfix' separatorPolicy= 'suppressed' or 'suppressedAtEnd', emptyValueDelimiterPolicy='initiator' *** Should 'postfix' separator be there when 'supressedAtEnd' *** ONE:one,TWO:TWOONE:,THREE:three<end> separatorPolicy= 'suppressed' or 'suppressedAtEnd', (TWO)emptyValueDelimiterPolicy='initiator' (TWOONE)emptyValueDelimiterPolicy='initiator' ONE:one,TWOONE:,THREE:three<end> separatorPolicy= 'suppressed' or 'suppressedAtEnd', (TWO)emptyValueDelimiterPolicy='none' (TWOONE)emptyValueDelimiterPolicy='initiator' *** We should discuss this example. *** Regards Alan Powell Development - MQSeries, Message Broker, ESB IBM Software Group, Application and Integration Middleware Software ------------------------------------------------------------------------------------------------------------------------------------------- IBM MP211, Hursley Park Hursley, SO21 2JN United Kingdom Phone: +44-1962-815073 e-mail: alan_powell@uk.ibm.com Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU