on 04-08-2008 11:38 AM
Guys,
What is the "Difference between maxOccurs>1 and maxOccurs = unbound" in any XML Schema? What I understand, both should be same. How the mapping behaves if any element has such restriction in target message?
Thanking you all in advance.
Hi,
0---Unbounded: 0 represents element either come or not come it is not mandatory.
1---Unbounded: 1 represents element value should come and it is mandatory.
Unbounded represnets the element value can reteate max times for example if Unbounded is replaces by 999 then that value will repeate 999 time or that value will come max of 999 times.
Sender side: 0 - Unbounded and 1 - unbounded doesn't make any difference it only says that you can send multiple records of this structure type.
Reciever Side: Yes it makes a difference as 0-unbounded is optional ,1-unbounded becomes mandatory , so you have to send at least one record other wise it will throw an error .
Regards
Aashish Sinha
PS : reward points if helpful
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
If the occurance of the target node is maxOccurs > 1 then the target element is created as often as mapped source element occurs in the source messgae and the same applies for the element which as maxOccurs = Unbounded.There is no difference.
Thanks!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Another clarification is needed .....!!
As I under stand if the maxOccurs > 1, then it is mandatory.....right? However if maxOccurs = unbound, then whether it is mandatory or not, it depends on minOccurs. If the minOccurs = 0, it is not required and if minOccurs> 1, then it is mandatory.
If my above statement is true....then does that mean that for maxOccurs>1, there is no any significance of minOccurs to make it mandatory or not? It will always mandatory irrespective of minOccurs...right? The only thing minOccurs would contribute that how many target elements are created.
Am I correct?
Hey
>>As I under stand if the maxOccurs > 1, then it is mandatory.....right?
No,it doesn't mean that.
minOccurs define whether a field is mandatory of not,if minOccurs is 0 then its not mandatory if minOcuurs is 1 then its mandatory.
maxoccurs only tells how many times it can occur,it does not tell whether it has to occur or not.
Thanx
Aamir
Hi Rajan,
What is the "Difference between maxOccurs>1 and maxOccurs = unbound" in any XML Schema? - maxOccurs>1 means the node will exist at least once and may be more than one time.
maxOccurs = unbound means there is no restriction on the occurance of the node.
So in XML schema you have to see the minOccurs field value..........so if a field has minOccurs 0 and maxOccurs unbounded then the field is basically optional and can or can not exist in the data...........but a field having maxOccurs>1 means the field will occur at least once so in a way it becomes mandatory.
So in mapping the difference arises that you can leave a field with 0..unbounded as unmapped as it is optional but you have to map the field having maxOccurs>1 as it is mandatory.
Regards,
Rajeev Gupta
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
>>What is the "Difference between maxOccurs>1 and maxOccurs = unbound"
Maxoccurs>1 means we can have the value for that fieeld max of one time
Maxoccurs-Unbounded means we can have unlimited values fror that field
Regards
Seshagiri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.