Need to allow dashes in entity names

0 votes
asked May 29, 2013 in To be sorted by anonymous

For sequence diagrams and others it would be very helpful if the entity names could contain dashes.  In many systems UUIDs are used for the entities and their text formatting includes dashes.  Using a boundary "0a32611c-624c-4a84-9e2d-348aa95f9726" as MONIKER doesn't work very well in autogenerated diagrams because it is difficult to track or lookup the moniker.  Being able to use the raw UUID text value would be a big help in generating useful diagrams.

commented Nov 26, 2013 by anonymous
I also would like dashes for http stuff.  I would be ok with spaces between dashes to indicate relations.

1 Answer

0 votes
answered Jun 4, 2013 by plantuml (295,000 points)
 
Best answer


Allowing dashes in IDs could be possible, but I am wondering if this would not cause some issues, because dashes are already used in relations (arrows).
For example, today, this simple example is working:

@startuml
a-b
@enduml


Because the dash is taken as a relation between a and b.

So I understand the advantage the use raw UUID for generating diagram, so we may consider this change, even if it would have some impact on existing diagrams (like my simple example).

Another option for you could be to replace dashes by underscore, ie using 0a32611c_624c_4a84_9e2d_348aa95f9726 instead of 0a32611c-624c-4a84-9e2d-348aa95f9726.

Since you are already doing text processing, this should not be a big deal.
What do you thing about it ?

 

commented Jun 12, 2013 by anonymous
Thanks, I didn't realize of the a-b conflict either as I typically put in spaces.  A transformation with underscores is what I'm doing now as a workaround.
commented Nov 26, 2013 by anonymous
quotes work.  For example: foo-bar won't work but "foo-bar" will.
commented Oct 13, 2022 by Daniel
Quotes do not always work.

Please support quotes for "port" names in component diagrams!

port firstportname

port "name-with-dash"             ; this works

"name-with-dash" --> firstportname    ; this does not work. Why?
commented Oct 17, 2022 by plantuml (295,000 points)

> this does not work. Why?

Sure, this is an issue.

Could you post here a short example that shows the issue, it would really help us.

Then we'll fix the issue.

Thanks again!

commented Oct 17, 2022 by The-Lu (64,340 points)

Hello D., and all,

Please support quotes for "port" names in component diagrams!

For that you could use alias, as:

@startuml
interface i
node n {
  port p
  port firstportname
  port "name-with-dash" as nwd
}

i --> p
i --> firstportname
'i --> "name-with-dash"
i --> nwd
'"name-with-dash" --> firstportname
nwd --> firstportname
@enduml

Enjoy,
Regards.

commented Oct 20, 2022 by plantuml (295,000 points)
...