W3C home > Mailing lists > Public > public-openannotation@w3.org > June 2020

SVG selectors and namespaces handling

From: Rainer Simon <aboutgeo@gmail.com>
Date: Sun, 21 Jun 2020 11:05:03 +0200
Message-ID: <CAKnoCZJCd=LssXnXvBD9JRQV=wk1ZZYkD_kqo-LN5PEo8XvY9g@mail.gmail.com>
To: public-openannotation@w3.org
Dear list,

I'm adding support for SVG shapes to Annotorious [1] and have a question
regarding the handling of the namespace when embedding SVG in the
SvgSelector.

The example in the documentation [2] doesn't declare a namespace, but it
does use a prefix:

<svg:svg>...</svg:svg>

Is the use of "svg" as a prefix + no declaration of the namespace an
existing convention for SvgSelectors? If there is a convention around
omitting the namespace, wouldn't it be more straightforward to consider the
default namespace to be SVG? (Especially since the svg prefix needs to be
repeated for every child element?) I.e. Simplifying the example to:

<svg> ... </svg>

Or, alternatively, should implementers instead be required to include the
namespace declaration in the embedded SVG? E.g.

<svg:svg xmlns:svg='http://www.w3.org/2000/svg'> ... </svg:svg>

This would leave possibilities open for different prefixes, if implementers
choose to use them. Or set SVG as the default namespace.

But having a convention on *both* the prefix value to use in the selector
*and* the omission of the namespace URI seems like one convention too many.
Or am I on the wrong path here?

Cheers & thanks in advance,
Rainer

[1] https://recogito.github.io/annotorious/
[2] https://www.w3.org/TR/annotation-model/#svg-selector
Received on Sunday, 21 June 2020 09:05:27 UTC

This archive was generated by hypermail 2.4.0 : Sunday, 21 June 2020 09:05:28 UTC