Thought I would report back, since I figured this out in the end - a case of RTFM! Namespaces do appear in the Programming Guide on page 186, but there is no explicit mention of how to make a Port Group independent. However, after revisiting the guide the penny dropped that adding a namespace to the datacenter is the equivalent of changing a Port Group to an Independent namespace. Once you grasp that (may be more obvious to you than it was to me), the examples in the guide can be followed.
So to change a Port Group namespace to Independent you need to do the following:
Make sure the content type is set to application/xml and not text/xml (which has worked for me elsewhere in the document) otherwise it fails with a complaint about content type.