Re: [Inkscape-devel] Attaching parasite information to an object (or group)
On sze, 2008-01-16 at 22:03 +0000, john cliff wrote:
if you add an attribute in the inkscape namespace such as inkscape:whateveryouwant i believe it shouldnt get lost.
I have read a bit of svg specification, and I have found what would be standard compliant. An container element (like 'g', the group) can have a <title> and a <desc> element.
I have added this to my group, and inkscape preserves it. However, inkscape also adds an additional id to the <desc> which I dont think so is permitted.
So when i copy my group, it becomes like this: <g id="g7890"> <desc id="desc9">this is my component</desc> <path id="path7884" d="M 168,215 L 397,215" style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> <text id="text7886" y="264" x="217" style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" xml:space="preserve"><tspan y="264" x="217" id="tspan7888" sodipodi:role="line">component's name</tspan></text> </g>
If somebody are interested, here is a bit more information about this: http://www.w3.org/TR/SVG11/struct.html#DescriptionAndTitleElements
I tried validate my svg document through validate.w3.org, but there are many errors, so I cant be sure if it is valide or not.
The question is: Is it permitted and desirable to attache an id tag into a title or desc element?
So which one is preferred?:
<desc>this is a description</desc>
vs.
<desc id="desc9">this is a description</desc>
And the latter is still valid svg?
Best regards, Khiraly
On Fri, 18 Jan 2008 20:38:32 +0100, khiraly <khiraly123@...240...> wrote:
The question is: Is it permitted and desirable to attache an id tag into a title or desc element?
It is permitted, and (at present) necessary for Inkscape's internal use.
Please read the SVG specification:
http://www.w3.org/TR/SVG11/struct.html#DescriptionAndTitleElements
The defintion of <desc> includes the set of attributes defined as in SVG.Core.attrib, which (according to http://www.w3.org/TR/SVG11/struct.html#core-att-mod ) are:
id, xml:base, xml:lang, and xml:space
-mental
participants (2)
-
khiraly
-
MenTaLguY