Re: Alternative syntaxes for the prolog

Why not use % - we don’t use it for anything else. And what about considering the prolog to be a property map, eg. 

%ixml version: “1.2”, foo: “bar” %

John Lumley
Sent from my iPad

> On 15 Dec 2023, at 18:26, Norm Tovey-Walsh <norm@saxonica.com> wrote:
> 
> "C. M. Sperberg-McQueen" <cmsmcq@blackmesatech.com> writes:
>> Actually, I think there is a reason for the "ixml":  human readers who
>> are trying to figure out what format the file they are looking at is in
> 
> Indeed. It’s useful for iXML to have an identifiable “magic number”[1].
> 
>> My first thought, looking at the examples, was that we could do a lot
>> worse than using the syntax of XML processing instructions with
>> pseudo-attributes, and use
>> 
>>  <?ixml version="1.1"?>
> 
> That’s clever, but isn’t it also inviting a certain amount of confusion?
> If you type <?xml instead of <?ixml that’s going to be quite different.
> Given that iXML and XML rub shoulders, I’m not sure we want to make the
> distinction “blurry”.
> 
> We already use parentheses for grouping, so I’m not an immediate fan of
> wrapping the prolog in them. I think I’d favor something that wasn’t
> already in the syntax. Luckily, there’s no real pressure here for it to
> be a single character. So this could work:
> 
> ::: The prolog goes here :::
> 
> If I hadn’t *just* said that I favor something that isn’t already in the
> syntax, I’d be tempted to suggest Python-style multiline strings:
> 
> """
> The prolog goes here
> """
> 
>                                        Be seeing you,
>                                          norm
> 
> [1] https://en.wikipedia.org/wiki/File_format#Magic_number
> 
> --
> Norm Tovey-Walsh
> Saxonica

Received on Friday, 15 December 2023 18:41:11 UTC