IE still bites – xhtml script tags
I rarely use IE except for testing. Lots of reasons for that, and I won't waste your time with that.
Today someone came to me saying they couldn't see our new help in IE. It worked fine for me in Firefox and Opera, but not in IE. In IE, there was nothing rendered, but if you viewed the source, you could see all the XHTML source. After spending a bit of time trying to diagnose what was going on, I figured out that it was the script tags.
In IE, you cannot use XML style empty script tags.
An empty tag is a tag with no text content. For example, a [code]
[/code] in HTML. In XML, all elements have to have a start and end tag, so that [code]
[/code] tag wouldn't be valid. Instead you do it this way, [code lang="xml"]
[/code] Notice the "/" before the closing bracket. That's just like doing this: [code lang="xml"]
[/code]
A script tag in XHTML looks like this [code lang="xml"][/code]
But, even though IE is fine with and every other empty tag I tested, it does not work with an XML style script tag. I had to change it to [code lang="xml"][/code]
Now the fun part. I'm converting to XHTML from XML. XSLT processors convert [code lang="xml"][/code] to [code lang="xml"][/code] You have to add a space between them to get what you want.
So, I spent about four hours tracking this down and fixing it, but my final check-in, when diff'ed against what was in source control, was a single character, a space.
Are we starting to learn? Don’t spoil your kids too much
Yes, you can stunt your children's growth by babying them. Thank goodness colleges are starting to make changes.
Colgate University is a College that is trying to deal with hovering parents. Hovering parents - if you can't figure out what that means you are either a member of the caste, or you don't spend anytime near people under 20.
Kids fall down. Kids hurt themselves. Kids get into fights with other kids. Kids fail tests. Kids live in dorms or off-campus housing that sucks. We all learn by being challenged. Don't rob them by solving all their problems for them. They need to be accountable to themselves, not you.
BTW, just in the interest of name dropping - I worked with Stirling Colgate for a while at Langmuir Lab in New Mexico. He doesn't take crap from anyone. He's a realist, and he's not afraid to say, "Why not?". Maybe he had something to do with this decision. I like to think so.
Shutting down the blogger.com blog
I didn't realize until I was looking through my site stats that people were still visiting, and search engines were still searching, my old blogger.com blog. My fault, really, I never took it down or posted an announcement. So today I posted an announcement, and set up a redirect.
If you are coming here from that old site, update your links to come here instead. The front page will soon redirect immediately. All the old content is here, but you don't have to update your links to archived information. It will remain there.
Sorry for the forgetfulness, and hopefully, if you're new to this blog, you'll enjoy the content you can find here, that wasn't at the old blog.
There are some really nice features of this blog, including category-based RSS feeds. In other words, if you're interested in my XML comments, but not in my political rants, subscribe to the XML RSS feed, not the entire site feed. Do this by clicking on the XML category and subscribing to the feed there.
As if we needed a study to show it, homeopathy is crap
See the Independent's article Effects of homeopathy 'are all in the mind'.
I read a really good book, sorry I can't remember the title, that was a skeptical take on, among other things, New Agism. The author admits, though, in the introduction, that she goes to a homeopathy practitioner. She admitted that she didn't want anyone to talk with her about it because whether it was real or just a placebo effect, she didn't care to know because it worked for her. Well, here's the news - it's the placebo effect.
Believe in homeopathy if you choose to, but science shows again, it's crap, and if you ask me what I think, I'll tell you.
Yeah, yeah, there are small studies that show that homeoapathy works, but they are weak studies. This new one trumps them all.
Building Projects
I'm at the stage now where the XML project (a set of DITA XML being used as online help) is past the prototype and into the building. Although this is the third time I've taken a set of handwritten help system and turned it into a generated helpsystem that is part of a regular build process, I forgot how rough it can be to do.
Rules of Nightly Builds
- Even if it works on your computer, it will almost always fail on the first nightly build on the server
- That thing you said won't affect the build, will
- Never schedule anything you can't reschedule during the evening of the first week of the new build process
CLASSPATH- There has to be a better way- You will embarrass yourself at least once, either with your boss, or your boss's boss
FO: font-size-adjust
XSL FO has a great feature for fonts, one I wish CSS could support - font-size-adjust.
To understand how it works, you have to first realize that a font size isn't based on its height. Oh no! A twelve point font isn't 12 points from the base-line to the top of a random character. That twelve point designation refers to the size of the em square. That is, the twelve points really relates to the width of the character "m" in a font. When you think of the height of a font, you are actually thinking of the ex height. Very few layout programs use ex height, though, so we're usually stuck setting how large a font displays by setting the size of the em square.
Normally this isn't a problem. But when you have more than one font in a single line of text (like this piece of code that's set in a monospace font while the rest of the line is not), you have to adjust the size of the em square for one or both fonts to make them look like they are the right size.
For reference, the monospace text on my blog is 1.1em, and the normal body font is set to 0.9em (is that confusing? In this case 1 em is the em square of the default font, before the CSS is applied, so my body font is 90% of the size you specified in your browser when setting font size).
So, the body text is 10% smaller than your default font, and the monospace font is 10% larger, but they look on the page about the same size. If anything, the monospace looks smaller than the body font, even though it's set to a larger size.
To get them to look about the same size, I had to fiddle around with various numbers until I found two I was happy with. The problem with that method is that I may be wrong, or your base font size may be very different than mine, and the fonts don't look right at all to you.
We define the ratio of the em square to the ex height as the aspect ratio of a font. Two fonts with the same aspect ratio would appear to be the same size when they have the same em square set. The aspect ratio of my monospace font is greater than the aspect ratio of my body font, so I need to adjust them to make them look similar.
XSL FO has a great attribute call font-size-adjust. With font-size-adjust you define the desired aspect ratio of you fonts. The FO formatter then uses the to compute the ex height of the first font family listed on the font-family property. Then it selects a font-size for all the other font families in the list so that the ex height matches. It's a much better way to make sure your font sizes match up then defining the em square size.
Amazon Media Manager
For the books I'm reading, or using for my projects, I'm taking advantage of a WordPress plugin Amazon Media Manager.
In the interest of honesty, let me tell you that I am an Amazon Affiliate, so if you don't want to give me a few pennies if you buy a book I recommend, go to your favorite bookseller directly, not through my links.
And, let me also recommend a great GreaseMonkey script for Firefox - Book Burro. Using Book Burro you can quickly see which of the book selling sites you visit have the best price on a book.
Learning XSL FO
I'm reading this book now to take my XML project to the next level - print.
Lovell comes from a TeX background, just like I do. His writing is casual, probably too casual for some people, but detailed. Loevell isn't afraid to state his opinions about tools and other choices, which is refreshing. Far too often writer's don't want to offend, and they leave us trying to figure out for ourselves what's a good or bad solution.
This book would be a little better if it talked about developing a process for creating a XSL FO template, not just the specifics of the technology. In other words, I'd like to see the how to do the what, not just the what.
Getting back on track
I haven't posted anything here for some time. I switched over to WordPress from blogger.com, and then ran into the same issues with WordPress I was having with blogger (formatting of code). I think I've got solutions now for all my issues, and so I should be able to get back on track.
I'm trying out the WordPress Code Highlight Plugin to make my XML/XSL/etc. look a bit better. We'll see how those work.
