Exercises

1. 

How many XML documents are linked to this XML document sample?

   <?xml version="1.0"?> <websites xmlns:xlink="http://www.w3.org/TR/xlink/">    <website xlink:type="simple" xlink:href="http://www.ws1.com">Yahoo</website>    <website xlink:type="simple" xlink:href="http://www.ws2.com">Google</website>    <website xlink:type="simple" xlink:href="http://www.ws3">EBay</website> </websites>   
  1. None

  2. 1

  3. 2

  4. 3

  5. 4

  6. 5

image from book

2. 

Attribute xlink:from and xlink:to apply to what type of an XLink?

  1. simple

  2. extended

  3. resource

  4. locator

  5. arc

  6. None of the above

image from book

3. 

XLink links to entire XML documents and XPointer links to fragments within individual XML documents. True or False?

image from book

4. 

How is XForms more powerful than HTML?

  1. XForms has greater functionality.

  2. XForms has more flexibility based on its generation from XML document content.

  3. XForms has all the capabilities of HTML.

  4. XForms is far more complex to use than HTML.

  5. All of the above.

  6. None of the above.

image from book

Answers

1.  

Exercise 1 solution

d. 3 is the correct answer because the XLinks are all simple types links (one source to one target). There are three XLink definitions from the current document and thus the current document is excluded because it is not linked back to.

2.  

Exercise 2 solution

e. arc is the correct answer. An arc XLink type describes the route between two resource links, and thus the arc proceeds from one resource link to another resource link.

3.  

Exercise 3 solution

The answer is True. XPointer points to an address, whereas XLink only links to a file.

4.  

Exercise 4 solution

f. None of the above is probably the best answer. XForms does have greater functionality, but only in the form of a few more built-in functions. However, look at the functionality and flexibility in HTML and XForms becomes solely data centric. HTML encompasses much, much more than just data-driven display. XForms absolutely does not have all the functionality of HTML because there is much more to HTML than just forms. It might be debatable as to whether XForms is more complex than HTML or not. From a programmers perspective, the flexibility of XForms, and the rigidity and coding intensity of HTML, XForms is much easier to deal with.



Beginning XML Databases
Beginning XML Databases (Wrox Beginning Guides)
ISBN: 0471791202
EAN: 2147483647
Year: 2006
Pages: 183
Authors: Gavin Powell

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net