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

Doug Royer douglasroyer at gmail.com
Wed Jan 15 20:33:19 PST 2020


On 1/15/20 8:21 PM, Brian E Carpenter wrote:
>> 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?

I use this tool with SVG files that I planned to use in this way.

I have not needed to solve contrast problems yet. When I do, my plan is to make anything more than 50% black, else white.  It can not handle complex SVG with shades of darkness or complex attribute values (like style). If I get energetic, I could do some contrast computation. Never tried anything that complex with XSLT, might have to do some scripting for that.

The next rev, I am going to tackle the style attribute. I do not know if it is solvable with XSLT. More of an intellectual exercise than a needed goal. If it gets complex, scripting will 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.

Yea, DIA and the DOT tools just make stick drawings. You can make nice flow and protocol state drawings with the dot tools (and with PIC for those of you that are troff experts).


-- 
Doug Royer - (http://DougRoyer.US)
Douglas.Royer at gmail.com
714-989-6135


More information about the rfc-interest mailing list