000419-2 |
You are designing a protocol for sending ratings of web pages to a data base. Each submission contains information about the rater (e-mail address, competence), identification of a document through its URI, and a series of values which rates the document according to different scales, such as readability, newsvalue, correctness, suitability-for-minors. Rater-competence can be amateur or expert. Write a DTD for this. Use XML attributes when suitable. |
|
Answer |
DTD: <!ELEMENT send-rating (atomic-rating+)> |
|
XML example (not required):
|
||
Note 1:"type CDATA #REQUIRED" would be equally good, maybe better, since it allows new types of ratings without changes in the DTD. Note 2:Since the question specified "Use XML attributes when suitable", a solution with sub-elements instead of attributes does not fully agree with the question. Thus, the following solution does not give full scores on this question: DTD (not correct answer):
XML example (not correct answer):
|