ModelDriven / Alf-Reference-Implementation

Open-source implementation of the Action Language for fUML (Alf) specification.
30 stars 2 forks source link

Compiled code with a string literal having control characters cannot be written to .uml file #67

Closed seidewitz closed 5 years ago

seidewitz commented 5 years ago

The Alf code for a string literal is mapped to a value specification action with a string value. The name of the action includes the literal string. However, if the string contains control characters (e.g., "\b\t"), then these are placed into the name of the action without escaping. This can result in characters that cannot be serialized to XML and, so, cannot be saved to a .uml file.

seidewitz commented 5 years ago

These characters can be easily removed from the name of the action, but they also appear in the actual string value of the value specification action. The problem is that XML 1.0 does not allow backspace or form feed characters, even if escaped. The solution is to serialize using XML 1.1.

seidewitz commented 5 years ago

Resolved in v1.1.0e.