• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

A question about XML Schema in Web services

 
Ranch Hand
Posts: 215
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 215
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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

Rahul

reply
    Bookmark Topic Watch Topic
  • New Topic