In this assignment, you must design an XML format to describe R software packages. The format should let users describe zero or more R packages in an XML document. For each package, the following information must be stored:
stringr.yyyy-mm-dd, e.g., 2025-09-08.Hadley Wickham) and an email address (another string, e.g.,
hadley@posit.co) that must be represented with separate
elements or attributes.cli, glue, lifecycle) and
must be represented with a separate element.Each of the above properties must be represented with a separate element or attribute. You must choose proper names for elements and attributes that clearly describe their intended purpose.
Create a DTD for this XML format to express the requirements above.
To demonstrate the use of the format, create an XML document that contains data about 5 or more different arbitrarily chosen R packages. The data about properties must be taken from here. An example of a package description: https://cran.r-project.org/web/packages/stringr/.
The document must contain both types of packages, i.e., packages that require compilation and those that do not.
Associate the DTD with the document in a document-type declaration.
Create a CSS stylesheet that renders the XML document as follows:
Each package must be shown as a box whose background color depends on whether it needs compilation or not. Different background colors must be used for both types. The boxes of the packages must be shown on top of each other.
Data describing a package must be shown on top of each other, just like on the web page of the package.
The name of the package at the top must be shown in larger font sizes.
Before the publication date, maintainer, and imports of the package, the web browser must show the Published:, Maintainer:, and Imports: text. Imports: must be shown only once, i.e., it should not be repeated before the name of each imported package.
You should use fonts, colors, and gaps to create an aesthetically pleasing visual appearance.
Associate the stylesheet with the XML document.