Web Services XML Schema                         Self Test With Answers



1) True or False? The root element of a schema document is the schema
    element.                                              True \ False           ( True )

2) True or False? A simple Element can contain text and attributes.
  True \ False                                                                         ( False )

// Comment: Only text!  Only a complex type can contain attributes.

3)  True or False? The default value for minOccurs and maxOccurs is 1.
    True \ False                                                                        ( True )

4)  True or False? Attributes, like simple elements, use minOccurs and
     maxOccurs to control occurences.                                    ( False )

// Comment: Attributes use a different mechanism based on the use attribute

5) True or False? Default values only make sense if attributes are optional.
   True \ False                                                                       ( True )


6)  True or False? The Union element can be composed of different sorts of
     simple and complex types.   True \ False                           ( False )

// Comment: A union can contain different simple types, even compound simple types
//  but not complex types.

7) True or False? Declaring an element that has an attribute and contains a
    simple value would require something like the following. True \ False

<xsd:element name="message" type="xsd:string"/>                 ( False )   
 

// Comment: simple types cannot have attributes

8) What is the attribute that allows an element to support mixed content?
    ________                                                                          ( mixed )