Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!
  • 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
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

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

 
It's hard to fight evil. The little things, like a nice sandwich, really helps. Right tiny ad?
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic