XSLT that emits source XML

I got this from a friend and have found it very useful for debugging my XSLT from content query web parts and data view web parts in Visual Studio. The below XSLT will output the source XML given to it:

<pre style="BORDER-BOTTOM: #999999 1px dashed; BORDER-LEFT: #999999 1px dashed; PADDING-BOTTOM: 5px; LINE-HEIGHT: 14px; BACKGROUND-COLOR: #eee; PADDING-LEFT: 5px; WIDTH: 100%; PADDING-RIGHT: 5px; FONT-FAMILY: Andale Mono, Lucida Console, Monaco, fixed, monospace; COLOR: #000000; FONT-SIZE: 12px; OVERFLOW: auto; BORDER-TOP: #999999 1px dashed; BORDER-RIGHT: #999999 1px dashed; PADDING-TOP: 5px"><?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl">
<xsl:output method="xml" indent="yes"/>

<xsl:template match="@* node()">
<xsl:apply-templates select="@* node()"/>


Read More >

If clients treated architects like they treat software designers…

I ran across this the other day and found it funny. A google search reveals that it may be from a mailing list from around 2000.

If clients treated architects like they treat software designers…
Dear Mr. Architect,

Please design and build me a house. I am not quite sure of what I need, so you should use your discretion. My house should have somewhere between two and forty-five bedrooms. Just make sure the plans are such that the bedrooms can be easily added or deleted. When you bring the blueprints to me, I will make the final decision of what I want. Also, bring me the cost breakdown for each configuration so that I can arbitrarily pick one.

Keep in mind that the house I ultimately choose must cost less than the one I am currently living in. Make sure, however, that you correct all the deficiencies that exist in my current house (the floor of my kitchen vibrates when I walk across it, and the walls don’t have nearly enough insulation in them).

As you design, also keep in mind that I want to keep yearly maintenance costs as low as possible. This should mean the incorporation of extra-cost features like aluminum, vinyl, or composite siding. (If you choose not to specify aluminum, be prepared to explain your decision in detail.)

Please take care that modern design practices and the latest materials are used in construction of the house, as I want it to be a showplace for the most up-to-date ideas and methods. Be alerted, however, that kitchen should be designed to accommodate, among other things, my 1952 Gibson refrigerator.

To insure that you are building the correct house for our entire family, make certain that you contact each of our children, and also our in-laws. My mother-in-law will have very strong feelings about how the house should be designed, since she visits us at least once a year. Make sure that you weigh all of these options carefully and come to the right decision. I, however, retain the right to overrule any choices that you make.

Please don’t bother me with small details right now. Your job is to develop the overall plans for the house: get the big picture. At this time, for example, it is not appropriate to be choosing the color of the carpet. However, keep in mind that my wife likes blue.

Also, do not worry at this time about acquiring the resources to build the house itself. Your first priority is to develop detailed plans and specifications. Once I approve these plans, however, I would expect the house to be under roof within 48 hours.

While you are designing this house specifically for me, keep in mind that sooner or later I will have to sell it to someone else. It therefore should have appeal to a wide variety of potential buyers. Please make sure before you finalize the plans that there is a consensus of the population in my area that they like the features this house has. I advise you to run up and look at my neighbor’s house he constructed last year. We like it a great deal. It has many features that we would also like in our new home, particularly the 75-foot swimming pool. With careful engineering, I believe that you can design this into our new house without impacting the final cost.

Please prepare a complete set of blueprints. It is not necessary at this time to do the real design, since they will be used only for construction bids. Be advised, however, that you will be held accountable for any increase of construction costs as a result of later design changes.

You must be thrilled to be working on such an interesting project as this! To be able to use the latest techniques and materials and to be given such freedom in your designs is something that can’t happen very often. Contact me as soon as possible with your complete ideas and plans.

P.S.: My wife has just told me that she disagrees with many of the instructions I’ve given you in this letter. As architect, it is your responsibility to resolve these differences. I have tried in the past and have been unable to accomplish this. If you can’t handle this responsibility, I will have to find another architect.

P.P.S.: Perhaps what I need is not a house at all, but a travel trailer. Please advise me as soon as possible if this is the case.

Read More >

IE8 Standards Mode and MOSS

Using IE8 Standards Mode with MOSS has been fairly trouble-free so far. However, the richhtmlfield editor throws javascript errors when the page is in IE8 Standards mode. Without switching to the Telerik control or defaulting all of my pages to IE7 mode - there is a simpler fix!

Enable IE7 compatability mode only on your edit pages. My master page had the IE8 meta tag:

<meta equiv=”X-UA-Compatible” content=”IE=8”>

right under the head element. To force your edit pages into IE7 mode, use the PublishingWebControls:EditModePanel to conditionally display it. Directly under the head element should now look like:

<publishingwebcontrols:editmodepanel id=”EditModePanel1” runat=”server” suppresstag=”true”>
<meta equiv=”X-UA-Compatible” content=”IE=7”>
<meta equiv=”X-UA-Compatible” content=”IE=8”>


Read More >

Fixing a noisy toilet

I’ve had to replace the flappers in all of my toilets in the 2 years I’ve been in my house. I thought that installing the higher quality flapper would be the last toilet fixes I’d be doing…I was wrong.

First, here’s what the inside of most toilet tanks look like:

Last night the toilet in the master bath started sounding like somebody was filling the tank with a high pressure water hose. Checking the tank revealed that water was shooting out of the top of the fill valve instead of going through the fill tube. I happened upon an article on Reader’s Digest’s website that broke down the different parts of the toilet tank and led me to believe that most likely my fill valve could use some cleaning. It also noted that fill valves are cheap and easy to replace. Sounded great to me!

You should always do your research before making a purchase (especially ones that could cause property damage…like plumbing items). Lowes has integrated customer reviews into their website - and perusing the fill valve items I found their highest rated (and almost least expensive) Korky QuietFill Fill Valve. I’ve used the Korky flappers and liked them, so this was a fine choice.

Went to Lowes and also found something I’d never seen before - an in-tank toilet bowl cleaning system that advertises that it only treats the bowl and won’t affect the tank parts. I suspect that I’ve had to replace previous flappers because I like to use the little chlorine circles that you put in the tank to keep the bowl fresh. I figured I’d already be in the tank, so I’d try this too. I got the “Flush ‘n Sprarkle” made by Fluidmaster. Their website is terrible or I’d provide a link…

Combining these two was a breeze. Make sure to follow the directions on the fill valve or you’ll have a very wet bathroom. Overall - this was an easy home fixit job that anybody can do.

Read More >

Windows 7 x64 Ultimate - Taking the plunge

I’m just about finished backing everything up off of my main machine (Windows 7 32-bit Ultimate). I’ve heard alot of good things about Windows 7 (read quite a bit too) - and even decent things about the install process. What’s tying me to Windows is Fallout 3 and the random Windows-only game…sorry Ubuntu, I love ya’ but we just can’t go steady yet.

I’ll update this post as I install and use this new OS. It feels like getting a new computer!

Update 2:41pm
I started the install at 2:20 and am typing this from the same machine with Windows 7 now. Checking the device manager, I’ve got only 1 device (my ATI TV tuner…don’t buy one of these) not recognized. Next up - Video drivers, TV Tuner drivers, and some apps.

Update 3:16pm
It looks like my ATI TV tuner doesn’t have a listed driver available for Windows 7. Some searching revealed that some had success with using the Vista 64 bit driver from the ATI downloads page. I installed this driver, but the device manager still showed the unknown device. Choosing to “Update driver”, I pointed the wizard to the location that the ATI installer had unpacked all the files to (C:\ATI). Windows picked up the driver and it’s now listed as “ATI Unified AVStream Driver”. I’m still configuring Windows Media Center, so I’m not sure if this will all work out - but the driver installed fine.

Update 3:50
TV Tuner works fine. Getting signal out here in the stix is another matter :)

Update 5:47
Got some of my apps installed. Restored Fallout 3 from the backup I created back into Steam - only to have to do the Games for Windows Live dance (don’t update through the game, go get the standalone client). Oh - and doing a steam backup of the game doesn’t capture any downloadable content you’ve acquired through GFWL. Bummer… at my current internet speed rate - I should be able to play Fallout 3 sometime next week.

Overall at this point I’m liking Windows 7. The real test comes tonight when I reshare my printer to another Windows XP box in the house. Vista was terrible with this…I had to restart the print spooler and open the printers window every time that machine needed to print. Here’s hoping it’s gotten better in 7.

Update 10/25/2009
It’s been a good while since I installed and I haven’t longed for XP or Vista at all. Printer sharing worked fantastic! No more restarting the print spooler. Fallout 3 finished installing and it ran the hardware check to auto-set my video settings. It auto-set higher settings than my Vista install did - now I can see NPCs faces :) Good times.

Read More >

subscribe via RSS