Custom attributes in svg files

Discussion about writing code for Inkscape.
iconberg
Posts: 36
Joined: Wed Feb 04, 2015 7:46 pm

Custom attributes in svg files

Postby iconberg » Wed Feb 04, 2015 8:14 pm

Hello,

are there a guide to add custom attributes to a tag (for an extension)?
If i need an own attribute to mark some tag like

Code: Select all

    <text
       xml:space="preserve"
       style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:Sans;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
       x="89.22467"
       y="124.67006"
       id="text3360"
       sodipodi:linespacing="125%"
      inx_openlabel="MY EXTENSION ATTRIBUTE">


i am allowed to do so? And, yes how are the naming conventions?

greets
iconberg

hulf2012
Posts: 716
Joined: Sat Nov 24, 2012 12:37 pm

Re: Custom attributes in svg files

Postby hulf2012 » Tue Feb 10, 2015 8:36 am

Hello,

I don't know if it could serve:
http://www.w3.org/TR/SVG/extend.html

The jessyink extension,
https://code.google.com/p/jessyink/

had to add special attributes in order to work, so maybe consulting the code there you could get an idea of how to do it.
If you have problems:
1.- Post a sample (or samples) of your file please.
2.- Please check here:
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/index.html
3.- If you manage to solve your problem, please post here your solution.

iconberg
Posts: 36
Joined: Wed Feb 04, 2015 7:46 pm

Re: Custom attributes in svg files

Postby iconberg » Tue Feb 10, 2015 8:33 pm

Ah, i see, thanks.
I go so and just put my tags in an own namespace.


Return to “Programming”