Re: W3C Anchor Tag Attribute Issue

Thanks Jukka, this is very helpful. I wasn't aware about the usage of
namespace prefix for SVG code.


Regards,
Dominick

On Wed, Jan 6, 2016 at 4:51 AM, Jukka K. Korpela <jkorpela@cs.tut.fi> wrote:

> 5.1.2016, 13:59, dominick caacbay wrote:
>
> Attached are the code for the issue.
>>
>> Validated by direct input with the following option settings:
>> Doctype: HTML5(Experimental)
>>
>
> Thank you for the clarification. The attached code is a fragment, but it
> is sufficient for demonstrating the problem, when the code
> <!doctype html>
> <title>Test</title>
> is prepended.
>
> The problem is that the document contains SVG code, properly enclosed
> between <svg ...> and </svg> tags, but without namespace prefixes needed
> there. Inside an svg element, an a element needs to have the namespace
> declared for its attributes, see
> http://www.w3.org/TR/SVG/linking.html#Links
>
> So instead of
>
> <a href="#" title="Page 1">
>
> you need
>
> <a xlink:href="#" xlink:title="Page 1">
>
> Yucca
>
> P.S. It is a bit of a mystery to me what happens in the validator when it
> first says that the href attribute is not allowed and then says that the
> href attribute is missing. The validator is of mixed nature, and it is not
> that good at namespaces. But what it apparently means is that the href and
> title attributes are not allowed without a namespace prefix and then says
> that the xlink:href attribute is missing, referring to it using its name
> without the prefix.
>
> Yucca
>
>

Received on Wednesday, 6 January 2016 05:05:48 UTC