• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

A question about XML Schema in Web services

 
Ranch Hand
Posts: 215
  • 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
 
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: 215
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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

Rahul

 
joke time: What is brown and sticky? ... ... ... A stick! Use it to beat this tiny ad!
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic