Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

doubt on one example in J2EE Web Services by Monson-Haefel

 
Edy Yu
Ranch Hand
Posts: 264
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just got the book and started reading ...
List 3-11 defines a schema as:
...
<all>
<element name="name" type="string" />
...
</all>
...
As the book says, minOccurs="0" and maxOccurs="1" for elements in <all>. This makes element name to be optional. But the books says name must be present in teh document.
I understand the default value of minOccurs for elements in <sequence> is 1. But how about this <all> case ?
 
iyven koh
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For <all> and <sequence> element, the default value for minOccurs and maxOccurs is 1.
You can refer this at XML Schema Tutorial
 
Xie Ruchang
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Edy
See this thread.
Regards
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic