Post #236,651
11/30/05 4:38:29 PM
|
Anybody ever parsed a DTD?
Because I'm convinced now that the W3C has some of the most reality altering narcotics around in a big old candy dish in the front lobby.
"Whenever you find you are on the side of the majority, it is time to pause and reflect" --Mark Twain
"The significant problems we face cannot be solved at the same level of thinking we were at when we created them." --Albert Einstein
"This is still a dangerous world. It's a world of madmen and uncertainty and potential mental losses." --George W. Bush
|
Post #236,654
11/30/05 4:48:47 PM
|
Not in polite company.
Peter [link|http://www.no2id.net/|Don't Let The Terrorists Win] [link|http://www.kuro5hin.org|There is no K5 Cabal] [link|http://guildenstern.dyndns.org|Home] Use P2P for legitimate purposes!
|
Post #236,706
12/1/05 12:14:48 AM
|
ICLRPD: Not in polite company. (new thread)
Created as new thread #236705 titled [link|/forums/render/content/show?contentid=236705|ICLRPD: Not in polite company.]
-- Steve [link|http://www.ubuntulinux.org|Ubuntu]
|
Post #236,655
11/30/05 5:02:43 PM
|
I've parsed RTF
But that was just banging a head against a wall. That's when I first started hating Microsoft.
Matthew Greet
Choose Life. Choose a job. Choose a career. Choose a family. Choose a fucking big television, choose washing machines, cars, compact disc players and electrical tin openers. Choose good health, low cholesterol, and dental insurance. Choose fixed interest mortgage repayments. Choose a starter home. Choose your friends. Choose leisurewear and matching luggage. Choose DIY and wondering who the fuck you are on a Sunday morning. Choose sitting on that couch watching mind-numbing, spirit-crushing game shows, stuffing fucking junk food into your mouth. Choose rotting away at the end of it all, pishing your last in a miserable home, nothing more than an embarrassment to the selfish, fucked up brats you spawned to replace yourself. Choose your future. Choose life... But why would I want to do a thing like that? I chose not to choose life. I chose somethin' else. And the reasons? There are no reasons. Who needs reasons when you've got heroin? - Mark Renton, Trainspotting.
|
Post #236,656
11/30/05 5:05:19 PM
|
ya gotta start somewhere :-)
Darrell Spice, Jr. [link|http://spiceware.org/gallery/ArtisticOverpass|Artistic Overpass]\n[link|http://www.spiceware.org/|SpiceWare] - We don't do Windows, it's too much of a chore
|
Post #236,704
12/1/05 12:13:01 AM
|
I'm sorry!
I've had to deal with that, too.
-- Steve [link|http://www.ubuntulinux.org|Ubuntu]
|
Post #236,658
11/30/05 5:13:10 PM
|
Yup
More fun is trying to validate that a given XML doc conforms to the DTD, given that the DTD can have same-named nodes at different levels of different nodes. Converting this to an unambiguous data structure that can still be comprehended by a normal human is tricky.
===
Purveyor of Doc Hope's [link|http://DocHope.com|fresh-baked dog biscuits and pet treats]. [link|http://DocHope.com|http://DocHope.com]
|
Post #236,671
11/30/05 5:45:03 PM
|
XML murders relational normalization thinking
The Buchanian navigationalists are trying to ressurrect themselves using XML and OOP to pull their rotting corpses from the cold, damp 1960's ground.
________________ oop.ismad.com
|
Post #236,690
11/30/05 9:13:51 PM
|
Web pages aren't meant to be relational
I'm building a program to check the general level of "wrongness" of the html in a web page. The formal definition of this is a DTD from the W3C. I've got a nifty parser built that seems to successfully build a DOM out of even the most hideous html and diagnoses things like unclosed tags and such as it goes. This gets me the general structural-ness stuff.
But for things like "you can't follow a table tag with a form tag" I'll have to go to the DTD. Turning a DTD into a useful data structure in memory has proven to be bloody challenging (although I think I just cracked it a couple minutes ago).
"Whenever you find you are on the side of the majority, it is time to pause and reflect" --Mark Twain
"The significant problems we face cannot be solved at the same level of thinking we were at when we created them." --Albert Einstein
"This is still a dangerous world. It's a world of madmen and uncertainty and potential mental losses." --George W. Bush
|
Post #236,959
12/3/05 8:12:02 PM
|
and it shows
________________ oop.ismad.com
|
Post #236,697
11/30/05 11:12:19 PM
|
DTD is an old muddled standard
W3C never went back to try and fix it, settling instead on some other xml extensions to do the trickier bits. Of course, that's always been the rub against DTD => its got its own format that has no relation whatsoever with xml, being more an ancient tongue. Anyhow, it's not too terribly involved, as there's only a finite number of variations of things that can be accomplished.
|
Post #236,761
12/1/05 1:56:46 PM
|
And to make it extra fun
The html 4.01 transitional dtd at w3c - the one at the official url and all - has a syntax error, failed to terminate the first element and open a new comment brace.
How sucky is that?
"Whenever you find you are on the side of the majority, it is time to pause and reflect" --Mark Twain
"The significant problems we face cannot be solved at the same level of thinking we were at when we created them." --Albert Einstein
"This is still a dangerous world. It's a world of madmen and uncertainty and potential mental losses." --George W. Bush
|
Post #236,765
12/1/05 2:39:55 PM
|
Well, they did label it as Transitional...
...meaning Transitional from Bad to Worse. :-)
|