• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

A question about XML Schema in Web services

 
Rahul Ba
Ranch Hand
Posts: 210
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I have already put this question in XML certification forum on Javaranch, but did not get the answer hence, re-writing here.






Which two element definition when inserted in the given
comment result to the correct schema type defination.


A. <xsd:element name="f" type="xsd:string">
B. <xsd:element name="i" type="xsd:long" maxoccurs="5">
C. <xsd:element name="l" type="xsd:string" mioccurs="1" maxoccurs="5">
D. <xsd:element name="f" type="xsd:string" mioccurs="0" maxoccurs="5">


What is the answer....I am confused..if there is any document links that provide me ability of solving questions.

Thanks,
Rahul
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
Please correct me if I am wrong, but as far as I understand, the use of <xsd:all> implies that all elements inside of the <xsd:all> has minOccurs=0 or 1 and maxOccurs=1.
This causes all alternatives you have supplied, except for alternative A, to become disqualified.
Reference: http://www.w3.org/TR/xmlschema-1/#Model_Groups

 
Rahul Ba
Ranch Hand
Posts: 210
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Thanks for the answer...You are right....

Rahul

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic