Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

What is in the xmlns:serif namespace, and why is it needed (or not) in SVG?

I’ve seen SVGs generated containing an xmlns:serif namespace, for example:

<svg width="180" height="50" version="1.1" xmlns="http://www.w3.org/2000/svg"
     xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/"...

I’m seeing this attribute flagged as an unregistered/unknown namespace, when the others in the same SVG are not. Serif’s site says nothing about it, and searching hasn’t found anything relevant either.

What SVG features are in this namespace, is it necessary, and why would it be considered invalid (for example by the W3C HTML5 validator)?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

It’s markup litter, presumably from the folks who control the http://www.serif.com/ domain that appears in the namespace URI.

Conforming SVG processors must propagate and ignore unknown XML components from foreign namespaces:

5.11. Foreign namespaces and private data

SVG allows inclusion of elements from foreign namespaces anywhere
within the SVG content. In general, the SVG user agent must include
the unknown foreign-namespaced elements in the DOM but will ignore and
exclude them for rendering purposes.

[…]

Additionally, SVG allows inclusion of attributes from foreign
namespaces on any SVG element. The SVG user agent must include unknown
attributes in the DOM but should otherwise ignore unknown attributes.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading