nthNameElem :: Int -> String -> String
    nthNameElem n name
        | n >= (nameLength - 1) = "" -- last or further component
        | otherwise = nameParts !! n
        where
            nameParts = splitWith "." name
            nameLength = length nameParts
nthNameElem :: Int -> String -> String
nthNameElem n name
        | n >= (nameLength - 1) = "" -- last or further component
        | otherwise = nameParts !! n
        where
            nameParts = splitWith "." name
            nameLength = length nameParts
nthNameElem n name
        | n >= (nameLength - 1) = "" -- last or further component
        | otherwise = nameParts !! n
        where
            nameParts = splitWith "." name
            nameLength = length nameParts