Path id in generated SVG

+3 votes
asked Jan 31, 2018 in Bug by Prashant (180 points)
Hi,

Consider the below code :-

@startuml

package level1 <<Layout>>{
class A
package level2 <<Layout>>{
class B
package level3 <<Layout>>{
class C
}
}
}

A->B
B->C
B -up-> A
@enduml

When I generate SVG for the above code :

1>  for A-down->B : path id is "A-B"

2> for B -up-> A : also path id is "A-B"

Here  I need to differentiate between paths A to B  and B to A.

Since in the 2nd scenario I am adding arrow from B to A but I still get the same id ="A-B",

due to which I am not able to differentiate between the two arrows using javascript.

Is there a way by which I can identify those arrows uniquely.

1 Answer

0 votes
answered Aug 19 by baerrach2 (220 points)
See https://forum.plantuml.net/11968/ids-generated-by-plantuml-are-not-xml-compliant

the beta is generating

path id="A-to-B"

and

path id="A-backto-B"

I added

```

A "named" -> B

```

into the diagram to see what would happen and the id generated is "A-to-B-1"
...