WiX XML

How to use WiX to congiure XML files during installation.

One of WiX's powerful features is XML interaction. WiX can create and delete elements or change values and attributes inside XML files. To do this we use either the util:XmlFile or util:XmlConfig elements. The two elements differ in subtle ways. util:XmlFile does not let you specify to be run on uninstall though it does allow you set the Permanent flag, which will undo the action on uninstall, while util:XmlConfig only allows you to delete or create an element, not update one.

To use either you must include a reference to WixUtilExtension.dll and add the namespace as follows:

<Wix XMLns="http:⁄⁄schemas.microsoft.com⁄wix⁄2006⁄wi"
     XMLns:util="http:⁄⁄schemas.microsoft.com⁄wix⁄UtilExtension">

Both elements contain the action attribute. This specifies the type of XML modification to be made. For util:XmlFile:

  • createElement
  • deleteValue
  • setValue
  • bulkSetValue


util:XmlFile does not have setValue or bulkSetValue. setValue matches the first element and updates its value while bulkSetValue updates all elements that are matched.

The other important attribute is ElementPath. This is an XPath which is used for matching the element (or for util:XmlFile elements) that needs to be updated. For more information on XPath view this tutorial. I also recommend this XPath evaluator for testing your expressions.

So lets have a look at an example. In this case we will alter a app.config file using util:XmlFile. This is an app.config file that we are installing into the default installation directory.

<util:XmlFile File="[INSTALLLOCATION]⁄Uploader.exe.config"  
  Id="config"  
  Action="setValue"
  Name="connectionString"                             
  ElementPath="⁄configuration⁄connectionStrings⁄add[\[]@connectionString[\]]"
  Value="TESTVALUE"
  ⁄>

What is happening here? Firstly the ElementPath XPath is set to match <configuration><connectionStrings><add connectionString = "" ⁄>. Secondly because the Name attribute is set it will set the value of the attribute rather then the elements inner value. If and when this node is matched the Value will be set to populate the attribute. Note that this util:XmlFile is nested inside the same component that contains the config file, it does however execute after the file is installed.


Posted by rrreese on Thursday, November 19, 2009

Tagged: Tech Windows Installer XML DOTNET


EP1 Review

Finally my review of the Olympus E-P1

I've had the E-P1 in my hands for a few weeks now, long enough to make some conclusions.

Lets start with the bad aspects of this camera.

Weaknesses

Several commentators have lamented the E-P1's lack of flash. I however haven't found this to be an issue. I rarely used the flash on my Canon, and the E-P1 is vastly more capable at taking low light shots. A fill flash would be nice, but its lack is more then made up with by the other features on this terrific camera.

A more serious challenge is focus. The E-P1 uses contrast measurement rather then phase detection like most SLR's. It is noticeably slower at focusing then my old Canon but not terribly so. It is much faster at focusing then any of the compact cameras I have used. If you need a fast focusing camera, i.e shooting sports, then this is not the camera for you. I don't have any issues with the focus, and as I will discuss later find the manual focus brilliant.

Final complaints center around the lack of viewfinder. Frankly this doesn't concern me at all. I viewfinder is nice, but live view has its advantages as well. I haven't had any problem using the live view in bright sunlight.

Strengths

The E-P1's greatest strength is its size. It is tiny compare to my old Canon. The Canon feels enormous now. The body is around half way in between a DSLR and a compact camera. It is not just the body that is small however. The kit lens is incredibly compact featuring a collapsing mechanism. The standard Four Thirds lenses are also a lot smaller then the usual fare from Canon/Nikon. Along with the Camera I bought a small Domke bag, the F-5XA. This bag easily fits The E-P1 with attached lens, along with a another lens. It would easily take a third pancake lens as well. This is despite being around the same size as my bag for the Canon, which takes only the Canon body and a single (non telephoto) lens.

Size was my main motivation for purchasing this camera. I wanted something smaller and lighter for traveling and the E-P1 is perfect. Its only competition is Cameras like the Canon G11 (which are smaller but less versatile).

Another feature that I love about the E-P1 is the manual focus assist. I have never been able to manually focus reliable with the APS cameras. Through a combination of smaller viewfinders and lack of focus matt, it's been a real problem. When you begin manual focus on the E-P1 however, the live view magnifies 7 or 10x, making it trivial to acquire focus, even at night. Now I've tried to focus at night with my Canon, and its just been impossible, the E-P1 delivers.

The Four Third and Micro Four Thirds system, use a fly by wire focusing system on their lenses. That is when the lens is in manual mode you do not directly control the focus, rather you rotate a dial which then controls the focusing of the lens. When I heard about this I thought that is sounded awful.After using it though, I can say that it is really well done. I find focusing smother then even some of the old manual primes that I've used. The speed that you rotate is matched by the speed that the lens focuses, so you can focus very small amounts very easily.Coupled with the live view magnification I'm totally sold on this system.

While most of the SLR manufacturers have implemented in lens image stabilization, the Olympus has gone with an in body stabilization system. I can not express in words how happy I am at this. The E-P1 features four stops worth of image stabilization, and it works with every lens from super wides to primes. This really changes the perspective of lens selection, as with my Canon deciding on whether to sacrifice image stabilization was a big part of the decision making process. Four stops of IS totally ups you ability to shoot with long lenses and in low light as well. I have successfully hand held at 1/3 of a second (with a 100mm equivalent lens), on the canon I'd be looking at more around 1/50th as the slowest shutter speed with equivalent lens.

Other Thoughts

There are several other features that should be noted about this camera. Firstly automatic mode is highly usable. Other cameras I've used almost exclusively in manual. I find myself using auto for more then half my shots. You still need to hit up manual for certain light conditions of course. The ergonomics are quite good for such a compact camera. Not as good as an SLR but given the limitations of size more then acceptable. Still if you put a heavy Four Thirds lens on it, you will need to use two hands to shoot. The flash hot-shoe came with a nice plastic protector, unfortunately it comes of to easily and after finding it at the bottom of my bag for the third time I removed it permanently.

The E-P1 is a great camera, especially for any one who wants to have a compact camera with the flexibility of interchangeable lenses. If you need high speed focusing avoid, otherwise it is worth serous consideration.


Posted by rrreese on Wednesday, September 02, 2009

Tagged: Photography


Photography Blogs

Good photography blogs that I follow.
A colleague of mine asked me what photography blogs I subscribe to. So as follows are the blogs I read regularly relating to photography.

Berlin Guide

Several times a week Grapf posts a photograph from around Berlin. A mixture of architecture and street photography. link

The Big Picture

The Boston Globe's website boston.com publishes groups of photographs from the recent new several times a week. One of my favorite photography sites. link

absolutely nothing

Awesome landscape photography. link

The Digital Journalist

The Digital Journalist is published monthly, incorporating articles as well as galleries of photographs. link

the impossible cool

Classic portraits of actors, writers, musicians, poets, photographers and other famous people. link

Beyond Phototips

Tips about photography, with plenty of awesome photographs. link

Beyond the Obvious

Paul Indigo's discussions regarding photography. link

The Sartorialist

Photographs of people wearing cool clothes, primarily street shots. link

Astronomy Picture of the Day

Photographs of astronomical phenomena. link

Daily Dose of Imagery

A photograph every day, a very good photograph every day. link

Damn Cool Pics

Lots and lots of interesting photos, posted regularly in sets. link

Earth Shots

Landscape photography published daily. Submitted from many users this is a competition site with a winner a day. link

Ed Z Studios

Photographs and discussion on photography by Ed Zawadzki. link flickr

Hitesh Sawlani Photography

Discussion and photographs by Hitesh Sawlani. link flickr

LeggNet's Digital Capture

Rich Legg, a photographer from Salt Lake City shares his photographs and opinions. Often backgrounds behind his stock photography shoots. link

Motivation

Howard Grill talks about photography, few photographs, lots of insight. link

Luminous Landscape

Luminous Landscape has been around for a long time now, plenty of discussion around photography, tutorials and review's. link

The Photographic World of Drew Gardner

Professional photographer discusses his work. link

The Work of Daniel Hellerman

Daniel Hellerman posts his many Photographs. No discussion. link

Thomas Hawk's Digital Connection

Great photographs and extensive discussion. link

Stuck in Customs

Travel photography by Trey Ratcliff. Plenty of HDR. link


Posted by rrreese on Thursday, July 30, 2009

Tagged: Photography


Sealpoint Road

Sealpoint Road on Otago Peninsula
Sealpoint Road47 Sealpoint Road48 Sealpoint Road49
Sealpoint Road50 Sealpoint Road51 Sealpoint Road52

Posted by rrreese on Sunday, June 28, 2009


Sandymount IV

Sandymount on the Otago Peninsula
Sandymount40 Sandymount41 Sandymount42
Sandymount43 Sandymount44 Sandymount45
Sandymount46

Posted by rrreese on Sunday, June 28, 2009


Sandymount III

Sandymount on the Otago Peninsula
Sandymount31 Sandymount32 Sandymount33
Sandymount34 Sandymount35 Sandymount36
Sandymount37 Sandymount38 Sandymount39

Posted by rrreese on Sunday, June 28, 2009


Sandymount II

Sandymount on the Otago Peninsula
Sandymount22 Sandymount23 Sandymount24
Sandymount25 Sandymount26 Sandymount27
Sandymount28 Sandymount29 Sandymount30

Posted by rrreese on Sunday, June 28, 2009


Sandymount I

Sandymount on the Otago Peninsula
Sandymount13 Sandymount14 Sandymount15
Sandymount16 Sandymount17 Sandymount18
Sandymount19 Sandymount20 Sandymount21

Posted by rrreese on Sunday, June 28, 2009


Kilns

Lime Kilns on the Otago Peninsula
Kilns11 Kilns12

Posted by rrreese on Sunday, June 28, 2009


Allens Beach II

Allens Beach on Otago Peninsula.
Allens Beach10 Allens Beach6 Allens Beach7
Allens Beach8 Allens Beach9

Posted by rrreese on Sunday, June 28, 2009