I’ve got a DTD that I’d kinda like to convert to a schema, just so my coworkers can read it more comfortably. But I’m not sure how to do it, and I haven’t seen anything indicating that it’s possible. Here’s a simplified version that contains the problem:
<!ELEMENT a EMPTY>
<!ELEMENT b EMPTY>
<!ELEMENT c EMPTY>
Yes. Although schema syntax can be rather lengthy so I’m not going to post a verbatim example here. But if that’s your main problem, try checking out this W3CSchools Tutorial on XML Schema.
What I think you basically want to do is define elements a,b, and c in a schema, then define a sequence containing them, and then define element x to contain that sequence with maxOccurs=“unbounded”, if that makes any sense to you.
The US gov. has declared the UN irrelevant.
The US gov. has declared public opinion “doesn’t count”
The US gov. considers loss of human lives “colateral damage”
The US props up dictators, gives’em weapons, then overthows them killing thousands in the process. HIP HIP HURRAY!
In general, it is possible to convert a DTD to a schema. Getting a program to help you do it is probably a good idea. I use Altova’s XML Spy. It’s really a great program and you can try it out free for 30 days. (I’m not advertising, just suggesting!)
Aside to ChaosGod: I’m sympathetic to your ideas, but I don’t want to see them in GQ. All right?
I was going to mention that. XMLSpy is a great program and has a pretty nice DTD<->Schema converter. I’ve noticed that if I try and make anything more than a very schema completely from hand, it ends up being very error-ridden. Their schema editor itself is quite nice as well. I also beleive that IBM’s alphaworks makes a schema editor that I’ve heard good things about, but I haven’t used it personally.
Well, I, for one, am certainly eager to be educated. Drop me an email at your earliest convenience[sup]1[/sup] explaining why you think your, um, aside is relevent to this General Question.
[sup]1[/sup]: Convenience being defined here as “before you post on this message board again.”
I once again apologize for incorrectly posting something that was meant for a thread in Great Debates.
The mistake was due to having multiple browser windows open at the same time.
Heck, I thought it was the funniest thing I’ve heard said about XML ever. (which isn’t saying alot, really) Personally I loved your attempt at a recovery, but it seems you didn’t get your earthquake, and others are not so forgiving.
I’m happy to see there’s an alternative to building schemas manually though. They scare me!
All right, I downloaded XMLSpy and ran through the conversion process. With no blank lines, my DTD is 29 lines long. The corresponding schema is 260+. I think I’ll keep it as is.