I want to generate a package diagram with hierarchical packages which may contain duplicated names but not in the same level. e.g.:
@startuml
package A {
package B {
package C
}
package A
}
@enduml
I think, package A.A
might be acceptable. But plantuml
failed with this error: Thie element (A) is already defined
.
I also try the following:
@startuml
folder A {
folder B {
folder C
}
folder A
}
@enduml
Then, plantuml
failed with the same error.
You can draw diagrams with duplicated names if you include non-printing characters in the definition, e.g. by putting the name in quotes and including one or more space characters:
@startuml
package A {
package B {
package C
}
package "A "
package "A "
}
@enduml
The additional spaces do not affect the layout in the diagram: