Use namespace in variable names
There have been proposals for the namespace in #145 (closed) and #144 (closed). In these two contexts, the namespace will allow to avoid name conflicts with variables from othe models. Also libraries with predefined parameters, such as physical constants, need a namespace to prevent conflicts.
The proposed syntax is name@namespace
, where the namespace does not have to be a valid ID, e.g. does not have to begin with [A-Za-z_]
but should be still alpha-numerical, without [/=-+]
that often appear in base64 encodings of UUIDs.
The TrueID
rule must be extended to parse variables with namespace.
The namespace can be used in the interpreter to create Python references to other textX models or simply can be added to the variable name and thus avoid conflicts in the model-local scope.
The use of UUID for a namespace raises the question not only about the composition of the UUID string but also about its length. Much more friendly are 8, 12 or 16 character strings but the minimum to map uniquely to a UUID is 22 characters. A solution is to use shortuuid.
Finally, the dupefinder has to be adapted to consider the extension in the construction of the query or verification of duplicate candidates.