+ urn_parts = urn_parts[:-1]
+
+ # convert hrn_parts (list) into hrn (str) by doing the following
+ # 1. remove blank elements
+ # 2. escape all non alpha numeric chars (excluding ':')
+ # 3. replace ':' with '.' (':' is the urn hierarchy delimiter)
+ # 4. join list elements using '.'
+ #hrn = '.'.join([part.replace('.', '\\.').replace(':', '.') for part in hrn_parts if part])
+ hrn = '.'.join([re.sub(r'([^a-zA-Z0-9\:])', r'\\\1', part).replace(':', '.') for part in urn_parts if part])
+