Syntax highlighting in XML editor

General discussions about Inkscape.
User avatar
bartovan
Posts: 191
Joined: Sun Feb 09, 2014 4:14 am
Location: Belgium
Contact:

Syntax highlighting in XML editor

Postby bartovan » Fri Apr 10, 2015 5:08 pm

This probably is a recurring topic, but I didn't find any recent posts about it (only old feature requests #170258 Syntax highlighting in XML editor and #198352 XML window and Layer window (whislist)), so I wanted to ask:

how about syntax highlighting in the XML editor?
Seems to me it would really be helpful, and being a non-programmer, I have the idea (probably ridiculously wrong) that the algorithms are there for the take and should just be copy-pasted into inkscape :) ?

EDIT: actually, it's especially the "style" properties that are a bit messy to read, other properties are nicely laid out in XML editor.
Maybe just break down the style attribute would be sufficient...
Portfolio bartovan.com
Tumblr / Instagram / Pinterest / Facebook / Twitter / OpenClipArt
Shop at Society6 / RedBubble
Using latest stable Inkscape on Ubuntu (current stable release) and Win 7.

troyd2010
Posts: 5
Joined: Tue Nov 16, 2010 11:01 am

Re: Syntax highlighting in XML editor

Postby troyd2010 » Sun Dec 13, 2015 11:14 am

Yes, break out the style values. It would be nice to have an option to split the style values into separate xml attributes to make writing XSLT scripts easier.

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

Re: Syntax highlighting in XML editor

Postby hulf2012 » Sun Dec 13, 2015 12:29 pm

Hello

As a side note, in the style attribute, there is so much information or specifications, that at the moment of visualizing in a web browser, it seems to me that it's unnecessary.
To explain me better:

Code: Select all

fill:#d40000;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1


In my opinion, It can be reduced to:

Code: Select all

fill:#d40000;stroke:#000000;stroke-width:1px


But, of course, for more complex designs, more info about the style may be needed.

And how about of support for CSS code, into Inkscape code? Since already exist support for JavaScript code in some parts of the SVG code.
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.

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

Re: Syntax highlighting in XML editor

Postby hulf2012 » Sun Dec 13, 2015 12:31 pm

troyd2010 wrote:Yes, break out the style values. It would be nice to have an option to split the style values into separate xml attributes to make writing XSLT scripts easier.


I think that option already exists, when you save to Optimized SVG. I think there is also something related when setting Inkscape's preferences.
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.

User avatar
bartovan
Posts: 191
Joined: Sun Feb 09, 2014 4:14 am
Location: Belgium
Contact:

Re: Syntax highlighting in XML editor

Postby bartovan » Mon Dec 14, 2015 1:02 am

I wonder if it helps to click "This affects me" in the bug report. I always do, hoping that it will gain some importance... Would love syntax highlighting too.
Portfolio bartovan.com
Tumblr / Instagram / Pinterest / Facebook / Twitter / OpenClipArt
Shop at Society6 / RedBubble
Using latest stable Inkscape on Ubuntu (current stable release) and Win 7.

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

Re: Syntax highlighting in XML editor

Postby brynn » Mon Dec 14, 2015 4:38 am

OT
I always thought it matters to click "this affects me too" on the bug report or feature request. (Because otherwise, what's the purpose of that option? Well, I think it does subscribe you to the topic.... But if subscribing is the only reason for it, why not just call it "subscribe"?)

Anyway, there was a rather significant change in 0.91 (how the sliders work for Opacity, Blur, and maybe some others). To me, it's outrageous, and I can't imagine why so many people must have wanted it. It makes those sliders harder to use, instead of easier, to me. As it turns out, the change was made because 1 person wanted it! I don't know if the 1 person who wanted it was the person who programmed it, or if actually 2 people wanted it (the reporter and the coder).

So now, I think it must be there just in case someone wants to use it as a measure for the popularity of the request. But I'm starting to think it doesn't matter much.

This is a part of open source development that's harder for me to understand. It's not necessarily democratic (majority decision, etc.).
/OT

Moini
Posts: 3186
Joined: Mon Oct 05, 2015 10:44 am

Re: Syntax highlighting in XML editor

Postby Moini » Mon Dec 14, 2015 7:57 am

I think clicking on that button increases the 'heat' of the bug, symbolized by the little flame in the bug list.
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)


Return to “General Discussions”

Who is online

Users browsing this forum: daniel_mark and 4 guests