Text this: X-ray transition radiation from an ultrarelativistic charge passing near the edge of a target or through a thin wire