Metadata missing from @startdot diagrams

0 votes
asked Apr 8, 2021 in Bug by coxley

Hey folks! I have tooling written around extracting the metadata from SVG / PNG diagrams. Noticed that they fail for @startdot/@enddot diagrams.

Is that an easy fix? Posting raw SVG of two diagrams to demonstrate below.

@startuml
digraph foo {
  node [style=rounded]
  node1 [shape=box]
}
@enduml

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
 "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.38.0 (20140413.2041)
 -->
<!-- Title: foo Pages: 1 -->
<svg width="62pt" height="44pt"
 viewBox="0.00 0.00 62.00 44.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 40)">
<title>foo</title>
<polygon fill="white" stroke="none" points="-4,4 -4,-40 58,-40 58,4 -4,4"/>
<!-- node1 -->
<g id="node1" class="node"><title>node1</title>
<path fill="none" stroke="black" d="M42,-36C42,-36 12,-36 12,-36 6,-36 0,-30 0,-24 0,-24 0,-12 0,-12 0,-6 6,-0 12,-0 12,-0 42,-0 42,-0 48,-0 54,-6 54,-12 54,-12 54,-24 54,-24 54,-30 48,-36 42,-36"/>
<text text-anchor="middle" x="27" y="-14.3" font-family="Times,serif" font-size="14.00">node1</text>
</g>
</g>
</svg>
# vs
@startuml
Bob -> Alice
@enduml

<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="117px" preserveAspectRatio="none" style="width:121px;height:117px;" version="1.1" viewBox="0 0 121 117" width="121px" zoomAndPan="magnify"><defs><filter height="300%" id="fn34gfzol33h" width="300%" x="-1" y="-1"><feGaussianBlur result="blurOut" stdDeviation="2.0"/><feColorMatrix in="blurOut" result="blurOut2" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .4 0"/><feOffset dx="4.0" dy="4.0" in="blurOut2" result="blurOut3"/><feBlend in="SourceGraphic" in2="blurOut3" mode="normal"/></filter></defs><g><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="28" x2="28" y1="40.2969" y2="74.2969"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="86" x2="86" y1="40.2969" y2="74.2969"/><rect fill="#FEFECE" filter="url(#fn34gfzol33h)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="42" x="5" y="5"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="28" x="12" y="24.9951">Bob</text><rect fill="#FEFECE" filter="url(#fn34gfzol33h)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="42" x="5" y="73.2969"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="28" x="12" y="93.292">Bob</text><rect fill="#FEFECE" filter="url(#fn34gfzol33h)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="46" x="61" y="5"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="32" x="68" y="24.9951">Alice</text><rect fill="#FEFECE" filter="url(#fn34gfzol33h)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="46" x="61" y="73.2969"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="32" x="68" y="93.292">Alice</text><polygon fill="#A80036" points="74,52.2969,84,56.2969,74,60.2969,78,56.2969" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="28" x2="80" y1="56.2969" y2="56.2969"/><!--MD5=[57395cf607a2ef690499b7fd7c1226b7]
@startuml
Bob -> Alice
@enduml

PlantUML version 1.2020.18(Wed Sep 30 12:40:44 PDT 2020)
(LGPL source distribution)
Java Runtime: Java(TM) SE Runtime Environment
JVM: Java HotSpot(TM) 64-Bit Server VM
Default Encoding: ANSI_X3.4-1968
Language: en
Country: US
--></g></svg>

1 Answer

0 votes
answered Apr 8, 2021 by plantuml (295,000 points)
Unfortunately, diagram created by @startdot are managed directly by the dot program.

So we do not have control over it, and we cannot add metadata there.

Sorry about this!
...