Simplify namespace handling

-- Omit unnecessary namespace changes in fragment generation
-- Consolidate namespace handling into one place
-- Correct assertion messages in some SVG-related tests