Exactly what is the attribute inkscape:label for anyway?

This is NOT a support forum. You are welcome to discuss software issues here, but all issues should be reported on Launchpad if you want them fixed.
heyzeuss
Posts: 3
Joined: Mon Feb 25, 2013 4:27 pm

Exactly what is the attribute inkscape:label for anyway?

Postby heyzeuss » Fri Sep 11, 2015 7:06 pm

What is inkscape:label for, if there is already an ID attribute?

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Exactly what is the attribute inkscape:label for anyway?

Postby brynn » Sat Sep 12, 2015 12:37 am

I can't answer this directly. But looking at the XML Editor, it looks like it's associated with Layers (layers are special groups, since there is no SVG standard for layers).

Maybe this could help? https://inkscape.org/en/learn/faq/#What ... ain_SVG%22?

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: Exactly what is the attribute inkscape:label for anyway?

Postby ~suv » Sun Sep 13, 2015 7:24 am

heyzeuss wrote:What is inkscape:label for, if there is already an ID attribute?

They don't serve the same purpose - the 'id' is a common XML attribute: it has to be unique in the current document (Inkscape ensures that), and has restrictions wrt allowed characters (see SVG and XML spec). The 'label' attribute is defined in a custom namespace ('inkscape'), does not have to be unique, and allows spaces as well as special characters without restrictions. The 'label' attribute can be added to any SVG element in the current document (see menu 'Object > Object Properties').

Inkscape makes use of it for example to store layer names: using the custom 'inkscape:label' attribute to store the layer name string which is displayed in the GUI (Layers dialog, status bar, etc.) gives users more freedom to name layers (e.g. allow repeated usage of the same layer name within one document, support spaces and special characters in layer names).


Return to “Discuss Software Issues”