posted 23 years ago
A friend of mine is trying to represent some recursive data in XML. Basically, a chapter can have some data as well as any number of sub-chapters, which in turn can have sub-sub-chapters, etc. Since the number of levels is not fixed, we don't want to use fixed elements like <chapter>, <subchapter>, etc. Ideally, the XML would look something like this:
Do you know if it is possible to represent this kind of recursive data in a DTD? Apparently the parser complained about the DTD that my friend used to constrain this XML document even though it looked fine.
I know there are alternative, possibly better ways to represent this data. I am just curious whether this is possible or not.
-Mirko