Categories: Blog

Paraffin 3.6–Now Keeping Custom Added Namespaces

Paraffin 3.6 can be downloaded here: https://training.atmosera.com/CS/files/folders/18310/download.aspx

Dan Gough had an excellent feature request to have Paraffin copy over any manually added namespaces to the .WXS file like the following. Previously, Paraffin ignored them, but no more.

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <Wix xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"
  3.      xmlns="http://schemas.microsoft.com/wix/2006/wi">

I updated Paraffin to copy over any namespaces added to the Wix element when creating the .PARAFFIN file. If you were having Paraffin inject additional elements with a .ParaffinMold file, now it’s easier than ever to keep your WiX fragments up to date.

When adding custom namespaces, put them before the default xmlns="http://schemas.microsoft.com/wix/2006/wi" as I’ve shown in the snippet above. With LINQ to XML, the xmlns attribute is special and does not show up in the Attributes collection so there’s no way I can sort it with the rest of the values. When generating the output XML file, XDocument always puts the xmlns attribute last. I tried all sorts of tricks to get it placed first but never got them to work.

There’s no trouble if you place your custom namespaces after the default xmlns, but in the .PARAFFIN file they will always appear first so you’ll see more changes when you diff the .WXS and .PARAFFIN file.

Please do let me know if you have feature requests! I considered adding a command line switch to allow adding custom namespaces when creating a .WXS fragment but didn’t think that would be used very much so decided against it. Of course, now that I’ve mentioned this option everyone’s going to ask for it. <grin!>

If you’re not familiar with Paraffin, please read the Zen of Paraffin document in the root directory of the download.

John Robbins

Recent Posts

8-Step AWS to Microsoft Azure Migration Strategy

Microsoft Azure and Amazon Web Services (AWS) are two of the most popular cloud platforms.…

3 days ago

How to Navigate Azure Governance

 Cloud management is difficult to do manually, especially if you work with multiple cloud…

2 weeks ago

Why Azure’s Scalability is Your Key to Business Growth & Efficiency

Azure’s scalable infrastructure is often cited as one of the primary reasons why it's the…

3 weeks ago

Unlocking the Power of AI in your Software Development Life Cycle (SDLC)

https://www.youtube.com/watch?v=wDzCN0d8SeA Watch our "Unlocking the Power of AI in your Software Development Life Cycle (SDLC)"…

1 month ago

The Role of FinOps in Accelerating Business Innovation

FinOps is a strategic approach to managing cloud costs. It combines financial management best practices…

1 month ago

Azure Kubernetes Security Best Practices

Using Kubernetes with Azure combines the power of Kubernetes container orchestration and the cloud capabilities…

2 months ago