Renaming

Renaming is principally there to allow different input syntaxes to 
serialise to the same name.

Names in ixml are both a superset of XML names, and recently also a subset.

This means that certain allowable ixml names may not be serialised to XML, 
which the grammar author has to be aware of, but also that it is impossible 
to serialise to certain XML names. This proposal would allow otherwise 
impossible names to be produced.

Currently renaming uses the syntax 

 name1>name2

where name1 identifies the syntax rule to use, and name2 how it should be 
serialised.

The proposal is to extend the grammar for a 'naming' to allow either a name 
or a string on the right-hand side, both: 

 name1>name2

and

 name>"string"

In the second case, the string represents the name to be serialised to. As 
with regular names, the author has to be aware of the restrictions on XML 
names.

Current syntax

 -naming: (mark, s)?, name, s, (">", s, alias, s)?.
 @alias: name.

Proposed syntax (only the rule for alias changes)

 -naming: (mark, s)?, name, s, (">", s, alias, s)?.
 @alias: name; string.

Examples

 nmonth>month
 dotless>"dotful."

I believe the current wording on serialisation needs no change, since it 
refers just to the alias.

Steven

Received on Tuesday, 15 October 2024 11:23:35 UTC