Monday, August 30, 2010

HTML and XML

Something I've always wanted to do is to mix HTML and XML. It is a way to hide content, or create conditional views.

This was created using bluefish 1.0.7 with some DTDs explicitly given, lots of standards stuff, the Galeon 2.0.7 browser is complaining that it can't load some URL, but it doesn't say which one.

Some XML

I just inserted a little XML into this, which the browser dutifully rendered in a straight forward fashion. I wonder if I can set a style for it, maybe make the color of the text red?

Yes, I can do just that!

The application is pretty trivial. I just insert some text inside some randon XML and give the most minimal style information I want. Since I told bluefish that this was strict HTML 4 with XML it auto-closes any tags I submit. So lets see if the browser makes a red block. Then lets see how easy it is to indent the block and italicize the text.

It did make a red block of text.

And it did Italicize.

But it only did an indent of the first line NOT a block indent. This was fixxed by putting a Display: block; attribute on the style.

Free Web Hosting