Sign In/My Account | View Cart  
advertisement

Article:
 SVG: A Sure Bet
Subject: Svg can not be used as an interchange format
Date: 2003-07-19 12:26:47
From: Robin Debreuil

"SVG is the neutral ground where multimedia format combatants can declare a truce and try to solve the interoperability problems that plague their customers. "
"SVG will also become the interchange syntax for all sorts of industry-specific or corporation-specific data visualization systems"


Svg makes a lousy interchange format for a number of reasons. First there are *many* things you can do in other formats that aren't supported by svg, how not. But more basically because it is a runtime format, not a storage format. Have you ever tried using it as an interm format between two+ graphics/multimedia formats? It really isn't practical for that type of thing, unless you are talking just simple vector data with solid fills. For that though, the world has no interoporability problems.



Previous Message Previous Message   Next Message Next Message


Titles Only Titles Only Newest First
  • Svg can not be used as an interchange format
    2003-07-19 13:35:22 Paul Prescod [Reply]

    Svg makes a lousy interchange format for a number of reasons. First there are *many* things you can do in other formats that aren't supported by svg, how not.


    Please give an example.




    • Svg can not be used as an interchange format
      2003-07-19 20:30:25 Robin Debreuil [Reply]

      ??? Well, there is more than one format in the world because each one does unique things suited to its particular task. So look at the specialty of any format, and you will find many things.


      Anyway, here are some examples - note: svg can do, or be made to do, some of these at run time. That doesn't make it suited to being an interchange format - for that it has to store these concepts, and in fact differing interpretations of these concepts, in a standard accessible way. By standard I mean consistent, not W3C...


      For two things I thought it should support, swapping depths of displayed symbols, and solid fill defs (they can't be defined as tags, yet gradients must be). For things that are beyond the scope of it (which are all hard interop areas): contours, vector distortions, shape blends (leaving a copy), extrusions (there are many ways these are done), variable width strokes, unusual warp fills, envelopes, different plugin formats... Basically pick a graphics/anim/xx program and go through the menus, you can find lots.


      Really for interchange you can go the 'meta format' route, where you make a superset of the technologies you are going to support, and/or just go the compiler route.


      And before you say - I know you can add your own custom tags to svg. You can add custom tags, or custom code to every graphics/anim format I can think of. That doesn't make them all suitable for an interchange format...


      PS: This is OT here, but I read your (very interesting) article on soap, linked off your personal website:
      http://mail.python.org/pipermail/xml-sig/2002-February/007183.html
      ..and I couldn't help drawing parallels to my thinking on svg. I guess you don't agree? I think svg would do well to come up with a one sentence definition of what it is for, and try to be great at that. "The PNG of vector graphics" would have been a great one, but it is too late for something that simple I'm afraid.


      Cheers,
      Robin

      • Svg can not be used as an interchange format
        2003-07-20 11:41:26 Paul Prescod [Reply]

        Of course any interchange format is going to lose some details of the native formats. It is quite rare to find one that does not. And yet we still make heavy use of them. When you cut and paste from one application to another you usually go through RTF or ASCII text which loses things. But people still cut and paste. If you want to integrate graphics from GIS software with graphics from a charting package, SVG will preserve everything that you could reasonably expect it to preserve. As the article said:


        "SVG will also become the interchange syntax for all sorts of industry-specific or corporation-specific data visualization systems, from maps of oil fields to architectural designs to molecular models. It will not replace the native XML data vocabularies for these things, but it will allow them to be rendered to a single display format so that disparate types of image can be integrated into unified graphical applications delivered through web browsers."


        But I will defer to the experts: "SVG has emerged as the new high fidelity vector graphic standard for the Web. Dozens of applications have developed or announced their intent to support the SVG format. This made SVG a natural candidate as the Visio team evaluated alternatives for exchange of Vector graphics with other applications going forward."


        And:


        "Over many releases, the Visio team had built or acquired import and export 'filters' for a large array of foreign graphic formats. Many of these were proprietary formats of competing products. In Visio 2002 release, the number of formats supported for import, export or both had reached 27 formats, 12 of which were proprietary formats of other products --- some of which had already announced they would be supporting SVG. The Visio team decided to deprecate support for a number of older formats and to add a single new format that would be supported by a wide array of other products --- SVG."


        Richard See,
        Lead Program Manager ? Advanced Technology Teams,
        Microsoft Office Visio, Microsoft Corp.


        http://www.svgopen.org/2003/papers/SVG_Scenarios_using_Microsoft_Office_Visio_2003/#S2.2


        You asked whether I see some of the same issues with SVG that I do with SOAP. I think that SVG could and should be modularized more. The Tiny and Basic profiles are a good start but just a start. Yes, I think that the SVG community has to wrestle more with issues of profiling, subsetting, customization and interoperability, but I have a lot more faith in their common understanding of their problem domain than I do for SOAP.


        • Svg can not be used as an interchange format
          2003-07-20 14:03:56 Robin Debreuil [Reply]

          Hey Paul,


          >> Of course any interchange format is going to lose some details of the native formats.


          It will lose whatever the spec allows it to lose, which is often zero, but at least not an arbitrary amount like 'what is supported by a third format'.


          >> When you cut and paste from one application to another you usually go through RTF or ASCII text which loses things. But people still cut and paste.


          Cutting unicode text as ascii would result in loss that would never be acceptable. All modern OS's can handle this, and most older ones will too. If your container only supports ascii, then it will have to be converted down, but you would never store it on the clipboard as ascii alone. That is why the clipboard can store data in multiple formats, and auto convert as well. Svg is generic like ascii, not all encompassing like unicode. That is a good analogy of why it can't be used as an interchange format for anything but simple cases where you don't mind loss.


          That would be fine, except it is a runtime format. So your data is stored across tags, entities, css, javascript, it might have to be transformed by xslt or script before being viewable, you might have to load bitmaps externally, your data might change half way through, and now rcc etc etc. This makes simple conversions like unicode>ascii pretty much impossible, because your data isn't stored in a consistent manner. That is the big reason it makes a lousy interchange format.


          >> Visio, the wonders, limitations are features, etc etc


          The visio quote has nothing to do with interchange - they are dropping support for formats, not making them easier to use. They are adding one. So if you had an older deprecated format, you now have to convert it to one of the supported ones - svg or one of the remaining formats. Is that what you meant by "solve the interoperability problems" - have a polite way of not supporting interoperability anymore?


          >> You asked whether I see some of the same issues with SVG that I do with SOAP. I think that SVG could and should be modularized more. The Tiny and Basic profiles are a good start but just a start. Yes, I think that the SVG community has to wrestle more with issues of profiling, subsetting, customization and interoperability, but I have a lot more faith in their common understanding of their problem domain than I do for SOAP.


          Ok, fair enough. Could you define the problem domain of SVG for me though, or point me somewhere that can? Maybe I would have a clearer view of why it is structured like it is if I knew the problem it was trying to solve. Right now I have a lot of 'fish or fowl' moments when trying to incorporate it into programs, or even my workflow...


          Cheers,
          Robin

          • Svg can not be used as an interchange format
            2003-07-20 22:08:00 Paul Prescod [Reply]

            > Paul > Of course any interchange format is going to lose some details of the native formats.


            > Robin > It will lose whatever the spec allows it to lose, which is often zero, but at least not an arbitrary amount like 'what is supported by a third format'.


            I'm having trouble understanding you. Whenever you have Model A and Model C and interchange through Model B you lose anything that A and C support that is not supported by B. But the alternative is to build A-Z * A-Z translators which is to say 676 translators. This never happens. Just to keep some sanity in the system you must necessarily choose some hub formats. The only question is whether the hub formats are open standards or not, and whether they are well-designed for the purpose or not.


            As an example, I did a Google search for "graphing software". I found OriginPro. What does it output GIF? Until recently that was patent encumbered and certainly not scalable. Now look at this long list of output formats supported by GraphViz:


            http://www.research.att.com/~erg/graphviz/info/output.html


            Which scalable vector format should I use for import into Keynote for the Mac? I'd like to believe that by 2005 there would be an obvious answer to that question but right now I don't think that there is. (amazingly, I had trouble with bitmaps and PowerPoint just last week!)


            Now look at OpenOffice Draw. What does it output? A bunch of bitmap formats and WMF. Oops. Most Mac programs (like Keynote) do not support WMF.


            Now I want to put the corporate logo into my presentation (or Visio file). What is the marketing department going to email me? Likely either a bitmap or an Illustrator file that is useless on my computer.


            > Cutting unicode text as ascii would result in loss
            > that would never be acceptable.


            That's just not true. Some tools only claim to support ASCII and if their user base is happy with that they get what they pay for. The application needs to indicate that it is losing characters and let the user choose another strategy if that is a problem. But more to the point, there are applications where Unicode is a lossy interchange format. That doesn't mean that Unicode is a LOUSY interchange format just that it is not in and of itself sufficient for all purposes. Where it is not good enough you augment it or use something else altogether.


            > All modern OS's can handle this, and most older ones will > too. If your container only supports ascii, then it will have > to be converted down, but you would never store it on
            > the clipboard as ascii alone. That is why the clipboard
            > can store data in multiple formats, and auto convert as
            > well.


            Great. So if you are cutting from Illustrator to Word would it not make sense that the clipboard formats would be Illustrator (for perfect fidelity), SVG (to at least get scalability) and PNG (to at least get graphics)?


            > Svg is generic like ascii, not all encompassing like
            > unicode.


            I don't see how "generic" and "all encompassing" are opposites. Furthermore, I don't see ASCII and Unicode as being opposites but rather living on different points on a spectrum. Some hate Unicode because it is too lossy. Others feel that in trying not to lose much it became too complicated (i.e. not lossy enough). Most people just figure they should use it when it fits and use something else when it doesn't.


            > That is a good analogy of why it can't be used as an
            > interchange format for anything but simple cases where
            > you don't mind loss.


            I don't see how "simple cases" have anything to do with it. You either can afford to lose what you lose by going through the interchange format (whether it is SVG, Unicode, PNG or ASCII) or you cannot. If you can, you use it and benefit from the fact that you have a way to get your data from point A to point C. If you do not, you had better hope that your point A and point C speak the same language.


            > That would be fine, except it is a runtime format. So your
            > data is stored across tags, entities, css, javascript, it
            > might have to be transformed by xslt or script before
            > being viewable, you might have to load bitmaps
            > externally, your data might change half way through,
            > and now rcc etc etc.


            You've conflated a bunch of issues. "Storing data across tags" is never a problem. The other features could be a problem if your exporting program uses them when they are not appropriate. For a simple graphic, Illustrator is not likely to put in a bunch of script. IIRC, the Visio guys said that they worked hard not to use script and used only a tiny bit for doing multi-ended links. So you would lose multi-ended links if you import Visio SVG into something that doesn't suport script. This is a concrete deficiency that can be solved by appropriate standardization (i.e. XLink). By the way, SVG that depends upon XSLT is not SVG.


            This makes simple conversions like unicode>ascii pretty much impossible, because your data isn't stored in a consistent manner. That is the big reason it makes a lousy interchange format.


            If you think that Unicode doesn't have similar issues you should look into "combining characters". Even XML itself has similar issues. The usual solution is to define normalization forms (as both Unicode and XML have). This is likely to happen in the SVG world when interoperability problems arise. After all, SVG-Tiny, SVG-Basic and SVG-Print are all profiles defined for certain kinds of interoperability.


            At this point it is probably more productive for us to wait and see. The Visio group has committed to using SVG for interoperability. The OpenOffice group has also. I think we will see that "in the small" we will see greater interchange capabilities between these programs thanks to this agreement. I also think that in the large we will see this effect multiplied across most applications, especially if Microsoft can be convinced to come on board. I guess you disagree and I'm going to have to agree to disagree.


            > Ok, fair enough. Could you define the problem domain of > SVG for me though, or point me somewhere that can?


            SVG is destined to be a Web format for vector graphics and a platform for Web-based graphical applications. But deploying standards on the Web takes a long time. In the meantime, subsets or variants of it will be used in a variety of domains like interchange between graphical apps, MMS messaging on cell phones, Intranet-applications, page layout and smart graphics applications. These variants were not the focus of the specification and are thus not all as clearly defined as the full specification (though some of them are).


            SVG would have been defined differently if interchange was the only goal but there is a vacuum to be filled there and industry leaders like Microsoft (through Visio), Adobe (through various SVG exports) and Sun (through OpenOffice) are going to try to fill it through SVG. I think that they will find SVG is not a perfectly suited standard (what standard is perfect!) but that it will still be substantially better than the vacuum (very similar to the situations with IP and XML, too other "better than the vacuum" standards). I expect that one or more "interchange" subsets will be defined either implicitly (as they are today) or explicitly (as has been happening more recently) over the next couple of years.




Sponsored By: