SVG support still very poor


#1

I just downloaded OmniGraffle 7 beta, just to check the level of SVG support. I just picked the first public SVG file that came to my mind, the OpenStreetMap logo. I was extremely pleased that it was imported as multiple editable objects. Unfortunately, it seems that the level of sophistication is still very poort. http://imgur.com/Sjo3zPO says it all.

I’m no expert in this field, but perhaps there is some “Acid” test available somewhere (like there was when CSS was created for webbrowsers).


#2

Unit testing by the developer would be a good idea.


#3

The reason we refer to the feature as “Basic SVG Import” is because we know it doesn’t support everything. The complete SVG standard is surprisingly complex, with a whole raft of completely different unrelated ways of parsing things. For example, the basic structure is XML, and you can apply styles as XML tags. But you can also apply styles using CSS, which is its own hugely complex standard involving tags, inheritance, etc. And to parse a custom path, you have to write a custom parser for yet another language that has its own idiosyncratic rules like letting you skip any punctuation or verbs that you could determine from context.

And, of course, the SVG standard is in the process of changing. Some of this helps simplify things, except that you still have to read stuff written in the old standard also so really it just makes things even more complex.

Which is not to say that we’re not continuing to work on it: we are. Just to let you know that our goal isn’t to have perfect support for all possible SVG files in 7.0. (For example, we currently don’t try to read text at all.)

Please do let us know where the current limitations are getting in your way, so we know what work to prioritize!


#4

Thanks @kcase for your detailed response.

I’m a network expert, so I am mostly interested in sharing network drawings in a common format. For Windows users, there is Visio, and Linux users typically use Dia or OpenOffice Draw. So for me, it would be even better if OG would support .dia or .sxd format. However, I rather have see that OG has proper support for one format, than broken support for many formats (of course, proper support for many formats would be sheer heaven in my universe).

The features I’m looking for are simple shapes (rectangles), embedded images (of network equipment and the like), and line drawings between these images, where the lines should closely follow the specified path (with multiple corners). also support for multiple text labels is essential. I don’t expect SVG to support the concept of anchors – that a line would ‘snap’ to a image or shape. (If it does, and OG would support that, I would be filled with joy and start dancing in the streets – wait, skip that last part. Given my dancing skills, that would be a Bad Idea). So lacking such a ‘magnet’ function, it would already be great if OG would honour existing groupings in the SVG file.


#5

The above applies to Imports. Macfreek has provided some direction and priorities.

My problem, the reason I can’t use OG-SVG, is on the Export side. The above does not apply to Exports. Export simply requires a developer who understands SVG tag-value pairs, and has the science to organise himself for the task: define an Hierarchy (once !); eliminate duplicates; etc.

  • On the Export side, one simply needs to determine the subset of SVG, that is required for a drawing, and elevate that to an in-house Standard.

  • For heavens sake, it can’t be that hard, the data.plist file is XML already !

  • The problem is, as evidenced, that the OG developers each do their own thing, and there is no corporate-level or product-level standard for anything. The GUI interaction, the plist file, or the SVG Export.

    • I know this, because I have parsed the plist file (you guys have no idea re the real value of OG, but let’s not get distracted). It has exactly, precisely, the problems that you have detailed re why parsing an SVG file is an ever-changing nightmare.
  • Your detailed explanation, when applied to the plist file, which has the exact same problem, stands as evidence that the XML in it is not a Standard. Likewise the SVG Export.

  • (Actually there is a deeper problem: you do not have a Relational Database for the OG drawing, it is a pre-relational, pre-1970 record filing system. Or even a Relational mindset. But I won’t get into that here.)

All my diagrams are in OG. Some are complex, but most are simple (very technical, but simple, in terms of a drawing). So I need SVG for that, only. Nothing serious.

First, let me say that the SVG Export works, in the simple, core sense. But it does silly things …

  1. SVG images
    When viewed in a browser, allow Hover. That is supposed to work like the Notes in PDFs before it was removed (it is not OG’s fault that Notes do not display in PDFs any longer). Therefore the Notes in each shape in the OG diagram, should show up as Notes when hovering over each shape in the SVG image in the browser.
  • They don’t.

  • What does show up in the Hover, is the LayerName. So every shape provides a Hover, whoopee, but the content is the same for every shape: LayerName. Ridiculous.

  • As far as I am concerned, that is a bug, which demands fixing, it is not a new feature request.

Cheers