updated to treat . as a path separator in the element id