I need to create an XML DTD that should validate XML documents like this
<document>
<book>
<title>
A wild title
</title>
<category>
Fantasy
</category>
</book>
</document>
I did so:
<!DOCTYPE document[
<!ELEMENT document(book)>
<!ELEMENT book(title, category)>
<!ELEMENT title(#PCDATA)>
<!ELEMENT category(#PCDATA)>
I would like that the value of 'category' is chosen from a finite set (i.e. "Fantasy", "Classics", "Modern"). Is this possible?