Self Test With Answers

1) True or False? XML elements except for the root element has a single
     parent?False \ True                                                               ( True )
 

2) Which of the following XML identifiers is legally correct however breaks
     a naming convention?

a) _after.all
b) xmlns:volume:section
c) _---_9289187
d) bingo-nite                                                                                  (b)

// Only a single colon is used in a correctly formed namespace identifier
 

3) Which of the following is not an XML delimiter?

a) <
b) >
c) &
d) :                                                                                                 ( d )

// A semi-colon but not a colon is an XML delimiter
 

4) Which of the following is not an attribute of the xml declaration.
a)  version
b)  encoding
c)  type
d)  standalone                                                                                 ( c )
 

5) What key character is missing from the following example of an XML
CDATA section?

<[CDATA[ content ]]>                                                                  (  !  )

// The exclamation mark after the first less than symbol
 

6) True / False Processing Instructions and Comments serve the same
purpose in an XML document. True/False                                    (  False )

// Comments are used to document an XML page while processing instructions
// provide xml applications a means of providing special processing in association
// with the document.

7) a) All well formed documents are valid. True/False                  (  False )
    b) All valid documents are well formed.True/False                   (  True )

// Documents must first be well formed in order to be validated against a DTD or Schema
// A Document may be well formed but still not be valid.

8) True or False. All elements inside an element that has a namespace declared
belong to that namespace. True / False                                            (  False )

// The default namespace must be declared to cause contained elements to adopt
// the default namespace of the element.