On Wed, 2009-01-07 at 22:02 +0100, Thomas Holder wrote:
Aurélio A. Heckert wrote, On 01/07/09 19:56:
> On Wed, Jan 7, 2009 at 2:57 PM, Ted Gould <ted@...11...> wrote:
>> On Sat, 2008-12-13 at 22:38 +0100, Thomas Holder wrote:
>>> is it possible to make the new namespace for inx files optional?
>>> I see no real benefit for the namespace, but it is a real
>>> drawback that all previous custom extensions will become invalid
>>> (until you add the namespace to the inx files). When we release
>>> 0.47 lots of users will be confused and will report bugs for this
>>> I guess.
>> Not really. Basically by doing this transition once we make things
>> a lot better for the future. I wasn't able to find a way to bring
>> in old files without doing something nasty like string editing them
>> on the fly -- which isn't desirable at all.
we could use a function like that to match all tag names:
gboolean match_tagname(const gchar *cstr, const gchar *tagname,
const gchar *ns = INKSCAPE_EXTENSION_NS_NC) {
gchar *str = (gchar*) cstr;
int nslen = strlen(ns);
if (!strncmp(str, ns, nslen))
if (str[nslen] == ':')
str += nslen + 1;
if (*str == '_')
str += 1;
return strcmp(str, tagname) == 0;
}
maybe this is "nasty", but it works (I've tested it) and I would prefer
it over broken old extensions.
I think it's nasty, but I'd be willing to go for it. Mental? Do you
have any thoughts on this?
--Ted