Hi
I'm not sure if this is the correct place to post this question, but I thought I'd give it a go ...
I'm designing an XML schema definition for a data container I'd like to use to pass around from system to system.
Inside the structure I have an optional key/value pair structure which could be populated with some additional information.
This is in the form of:
/additionalInfo/info/key
/additionalInfo/info/value
My question is, as this is an optional element, should the who additionalInfo element be optional or just the info part?
I realise you can do both, and probably both are fine. But as a general rule/standard, which one is better?
One programmer I have asked here has said the following:
"The logic goes along the lines that additionalInfo is a holder, and if there's no actual info in the holder then there's no info, but the holder's always there in case a later part of the message flow adds some."
Although plausible, this doesn't sound right to me?
Thanks in advance
I'm not sure if this is the correct place to post this question, but I thought I'd give it a go ...
I'm designing an XML schema definition for a data container I'd like to use to pass around from system to system.
Inside the structure I have an optional key/value pair structure which could be populated with some additional information.
This is in the form of:
/additionalInfo/info/key
/additionalInfo/info/value
My question is, as this is an optional element, should the who additionalInfo element be optional or just the info part?
I realise you can do both, and probably both are fine. But as a general rule/standard, which one is better?
One programmer I have asked here has said the following:
"The logic goes along the lines that additionalInfo is a holder, and if there's no actual info in the holder then there's no info, but the holder's always there in case a later part of the message flow adds some."
Although plausible, this doesn't sound right to me?
Thanks in advance