[rfc-i] No, constraining to a custom SVG profile is not trivial

Brian E Carpenter brian.e.carpenter at gmail.com
Wed Jan 15 19:21:10 PST 2020


> Attached is a simple XSLT script that I created that simply rips out invalid elements.

The problem with colour/greyscale is that this isn't enough. If you have very dark blue text on a very pale pink background, what happens? svgcheck makes this black on black; my heuristic makes it black on white. What would your script do?

But I do agree with Phill, this is a non-trivial issue. Currently I think doing new drawings with a simple tool like DIA is the only practical way.

Allowing unrestricted SVG has plenty of issues too.

Regards
   Brian

On 16-Jan-20 15:23, Phillip Hallam-Baker wrote:
> Thanks, I think I have a system that might be sufficient for most of it. Main thing missing right now is end of line markers and I have to work out what the transforms are on those.
> 
> Basically, I wrote a CSS parser this morning and a partial SVG engine that tracks the X, Y and Font-Size attributes this afternoon. Net result is I can massage the files into something almost OK. Just have to call it out from my RFC converter and it is done.
> 
> Of course at this stage, it might have been easier to work out how to write a converter for Word diagram format.
> 
> 
> On Wed, Jan 15, 2020 at 7:56 PM Doug Royer <douglasroyer at gmail.com <mailto:douglasroyer at gmail.com>> wrote:
> 
>     On 1/15/20 1:14 PM, Phillip Hallam-Baker wrote:
>     > I am just attempting to massage my diagrams to get them into the SVG profile. Contrary to the claim made in RFC7996, creating a completely non-standard profile is not a trivial matter.
> 
> 
>     If this helps, I use DIA (a program) to make simple SVG files (export as ...). I have not had the need to translate complex SVG files yet. I have also used this script on some Postscript -> SVG converted files.
> 
>     It also works with DOT set of tools (ImageMagic command line tools): dot, neato, twopi, circo, fdp, sfdp, patchwork, and osage)
> 
>     Attached is a simple XSLT script that I created that simply rips out invalid elements. It would not be to difficult to make it alter attribute values. Attributes like 'style' would take some extra work. So far, I have not needed that.
> 
>     When I create the SVG files, I just don't use color and complex styles. If needed this could be expanded.
> 
>     -- 
>     Doug Royer - (http://DougRoyer.US)
>     Douglas.Royer at gmail.com <mailto:Douglas.Royer at gmail.com>
>     714-989-6135
>     _______________________________________________
>     rfc-interest mailing list
>     rfc-interest at rfc-editor.org <mailto:rfc-interest at rfc-editor.org>
>     https://www.rfc-editor.org/mailman/listinfo/rfc-interest
> 
> 
> _______________________________________________
> rfc-interest mailing list
> rfc-interest at rfc-editor.org
> https://www.rfc-editor.org/mailman/listinfo/rfc-interest
> 



More information about the rfc-interest mailing list