Q. I'm designing my first DTD. Should I use elements or attributes to store data?
A. Of course. What else would you use?
Q. What is the usual way to choose between using attributes and children?
[Update from David Carlisle:]
In England, the normal method is to flip a coin in the air and call heads it's attributes, tails it's children.
Unfortunately I'm not sure what to suggest in other countries where you can't guarantee having the Queen's head on one side of every coin.
But then there is the wealth of XML standard data representations for financial/fiscal/e-commerce, medical, etc. data. You're deciding to use them to have your interfaces being implemented once and for all, and be able to switch eg. payment providers by merely specifying new endpoints and credentials. JSON doesn't really compare to XML/XSD in this space.
That said, the effort to write a valid schema was rather high. And it was sold with the other technologies that were in violation of the anti-fragile spirit of the web. That left us with people wanting something different. JSON was born as much for basically being javascript literals minus functions as it was anything else. Most any other explanation is just someone selling you something.
(Now, attributes did offer a technical way to ignore subsets of the attributes that would be hard to do any other way. But they didn't exactly make it easy, and namespaces did not compose nearly as well as people hoped they would.)
I do miss being able to have comments.
Of course that's often not an issue, but I've run into it in the past. :)