- From: Bethan Tovey-Walsh <bytheway@linguacelta.com>
- Date: Fri, 28 Aug 2026 14:32:01 +0100
- To: Norm Tovey-Walsh <norm@saxonica.com>
- Cc: Graydon Saunders <graydonish@fastmail.com>, ixml <public-ixml@w3.org>
> It might be possible to persuade me that "" is a more likely error in merging than adding or omitting a ∅ from the input, but that’s not obviously the case to me To add to this, I certainly don't see how an empty clipboard is any more or less likely to result in "" than it is to result in [] or (). You typed a delimiter (and your editor automatically inserted the corresponding closing delimiter); you pressed Ctrl-V; you somehow didn't notice that nothing was pasted, and moved on to some other part of the grammar. In the case of an accidental [], the error will be catastrophic, since it will cause any parse to fail. () currently means the same as the proposed "", so it will cause exactly the same problem as "" would. >> there are work environments where the local customs are strongly against attributes without values Well, sure - but we're always going to allow those to be created in IXML. The only question right now is what syntax we use, not whether this is allowed. If you're really concerned about this kind of thing, I suspect the best option would be to enforce a restricted subset of IXML via schema validation of the IXML grammar. You could validate the XML representation of all your grammars, checking for things like attributes which can match epsilon. I'm sure you could write an XSLT stylesheet that would pick out any transgressions, too. This would be a far better way of enforcing your project's specific requirements than relying on intuitions about what authors may or may not have meant when they typed a given sequence of characters, I would think. I know we've talked about writing a schema for the XML representation of an IXML grammar, but it might also be useful to write some standard stylesheets, or guidelines for people to write more restrictive schemas to validate their grammars? I don't think we're doing enough to make use of the affordances offered by the XML representation for IXML. BTW ___________________________________________________ Dr. Bethan Tovey-Walsh linguacelta.com Golygydd | Editor geirfan.cymru Croeso i chi ysgrifennu ataf yn y Gymraeg. > On 28 Aug 2026, at 14:11, Norm Tovey-Walsh <norm@saxonica.com> wrote: > > "Graydon Saunders" <graydonish@fastmail.com> writes: >> In a production environment, there's the possibility of it being an outright mistake -- e.g. Ctrl-C, Ctrl-V either missed the Ctrl-V or > > If you’re deploying untested or automatically generated code into production without review, I think that’s a larger problem than the symbol chosen. > > It might be possible to persuade me that "" is a more likely error in merging than adding or omitting a ∅ from the input, but that’s not obviously the case to me. > >> That's clear if someone reading the ixml grammar can be certain that the empty quotation marks are intentional. > > Why is it any less clear that "" was intended than | or ; or any other sytactic symbol in the grammar. I confess, I’m struggling to see what makes a quoted string special in this regard. > >> Whereas I can't really imagine what alternative meaning anyone might assign to this: >> >> person: -"name: ", name. >> @name: "". >> >> "Did someone else on this project mean to leave those quotes empty, or should there have been something in them?" > > That seems very much like the question, “did someone else on this project mean to put a , between those two tokens in person, or should that have been a ;?” > >> (Especially since there are work environments where the local customs are strongly against attributes without values, or that it's >> plausible someone stuck that in so they could do the other other without having to figure out where @name's value should come >> from, that was going to be the next thing.) > > But surely that’s no more-or-less true of > > @name: ∅. > > Better to train users to put in > > @name: FIXME. > > and near the top of the grammar: > > FIXME: "" . > >> I would generally agree that there isn't a natural consensus, call it. (e.g., in XPath, () is the empty sequence. If that's the default >> mental reading for (), it makes a lot more sense as a symbol for "empty" than perhaps it does otherwise.) > > See my earlier remarks about being damned if you allow whitespace and comments in between them, and damned if you don’t. > > -- > Norm Tovey-Walsh > Saxonica >
Received on Friday, 28 August 2026 13:32:21 UTC