Win a copy of Emmy in the Key of Code this week in the General Computing 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
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

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

 
No one can make you feel inferior without your consent - Eleanor Roosevelt. tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!