a tag namespace aware rewrite and renderer