# Assignment

In this assignment, you must design an XML format to describe [R](https://www.r-project.org/) 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:

* The name of the package: a string, e.g., `stringr`.
* The publication date of the package: a string of the form `yyyy-mm-dd`, e.g., `2025-09-08`.
* Whether the package needs compilation: a boolean value, must be specified with an attribute of an enumerated type.
* The maintainer of the package: consists of a name (a string, e.g., `Hadley Wickham`) and an email address (another string, e.g., `hadley@posit.co`) that must be represented with separate elements or attributes.
* **Zero or more** imports, each of which is a string (e.g., `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.

## DTD

Create a DTD for this XML format to express the requirements above.

## XML document

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](https://cran.r-project.org/web/packages/available_packages_by_name.html). 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.

## CSS stylesheet

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.
