Re: Renaming

On Wednesday 29 May 2024 16:15:26 (+02:00), C. M. Sperberg-McQueen wrote:

> Some notes interleaved.
> 
> Norm Tovey-Walsh <norm@saxonica.com> writes:
> 
> >> Steven Pemberton <steven.pemberton@cwi.nl> writes:
> >>> Since we have agreed on a change that means that certain XML names
> >>> are no longer possible in serialisations,
> >>
> >> ...
> >
> > The change is “.” at the end of a name.
> 
> >>> and an additional
> >>>
> >>>  name>"string"
> >>>
> >>> it means we unbind the syntax of names used in the grammar from
> >>> those used in the serialisation.
> 
> Er, the syntax of names used in the grammar has for a long time not been
> the same as the syntax of XML names.  That is one of the reasons we have
> to have a rule saying that it's an error if a grammar specifies a
> serialization that would not be well-formed XML (two attributes of the
> same name, nonterminal or alias not an XML name, etc.).

Correct me if I'm wrong, but ixml names have up to recently been a superset of XML names, which is the reason behind the rule you mention.
In other words, we have always, until recently, been able to produce all XML names. The fact you can produce more than XML names doesn't seem like a particular problem to me, and makes the rules for what a name is much simpler.

> It was not a design decision I favored at the time -- for some users
> (including me) things would be far simpler if ixml's nonterminals were
> just defined as strings conforming to the definition of Name in the XML
> spec -- and the experience of the last few years has not shown me any
> advantages to our decision not to align with XML on the matter.  But I
> acceded to the decision.

> I now have two questions:
> 
> (1) From Steven's word choice, I infer that he believes it would be a
> good idea to separate the syntax of nonterminals further from the syntax
> of XML names.  Why would it be a good idea?


I understand that you are only interested in producing XML, but I use, and plan to use, ixml for other representations as well, so I'm not super-bound to the idea of making ixml names and XML names identical. But I'm not too worried about the current definition, even though loosening it would make more characters potentially available for other purposes.

> (2) The proposal to make the right-hand operand of ">" a quoted string
> seems to allow wider freedom in the wrong operand.  If we want to allow
> things in nonterminals that are not allowed in XML names, then it's the
> left operand that needs to be changed, not the right operand, surely?
> Suppose we decide, in hommage to van Wijngaarden's practice, to allow
> blanks in nonterminals.  Then 
> 
>   n_block > "nested block"
> 
> is, as far as I can see, copmletely backwards.  We would need to write
> 
>   "nested block" > block2
> 
> or something similar.  So my second question is:  why does the proposal
> make the alias, instead of the nonterminal, a quoted string?

Because there are XML names you can no longer produce on serialisation, and I thought it would be of service to the XML community to remove that restriction.

> >>> (This also means we *could* simplify the definition of names used in
> >>> grammars).
> 
> >>
> >> I don’t see much benefit to moving away from XML names for grammar
> >> symbol names. I’m afraid it will just cause confusion by requiring
> >> renaming (which is already a complication in the grammar for users).
> >
> > He also said:
> >
> > We've just done it. But I'm OK with keeping what we now have as is. 
> 
> No, we have not "just done it".  It was done quite a long time ago,
> measured in the lifespan of ixml. 

It's based on an action of yours from March: https://lists.w3.org/Archives/Public/public-ixml/2024Mar/0009.html which I consider recent.

> Like Norm, I don't see much benefit to moving nonterminals further away
> from XML names

My suggestion is only to allow all XML names to be serialised. I only mentioned in passing that it would permit an unbinding of the connection between the two.

Steven

> -- or more generally moving ixml further away from XML
> and related technologies.  Since every other grammar notation I have
> used over the years is far more restrictive than ixml in how
> nonterminals may be named, I have not been chafing under the
> restrictions of ixml's definition of name.  Perhaps others have had
> different experiences.
> 
> Michael
> 

Received on Thursday, 30 May 2024 10:35:24 UTC