Allways casting stream to URI in XML stream writer.