WebKit+SVG should have common code to validate uri references The SVG spec defines exactly what sort of elements can reference other elements in the SVG spec. Although we do some checking, we don't have a nice consistant model. I think finding a nice way to implement this (with a virtual function on SVGElement?) could be a win for both code clarity and spec conformance. For a list of which elements are allowed to map to which others: http://www.w3.org/TR/SVG11/struct.html#Head