W3C home > Mailing lists > Public > public-ixml@w3.org > May 2021

text injection - two thoughts

From: C. M. Sperberg-McQueen <cmsmcq@blackmesatech.com>
Date: Tue, 11 May 2021 10:54:57 -0600
Message-Id: <D8F0FB64-A671-4260-9C40-1567D4841483@blackmesatech.com>
Cc: "C. M. Sperberg-McQueen" <cmsmcq@blackmesatech.com>
To: public-ixml@w3.org
I’ll try to develop a fuller note on this topic later, but for now I wanted to mention two ideas that I think might be relevant.

1 I think (subject to refutation by experiment) that both namespace injection and data injection into the XML might be handled syntactically using pragmas.  

By ‘pragmas' I mean annotations which can be acted on by processors which understand the particular pragmas used and which can be safely ignored by other processors.  I believe we already have a live issue suggesting that we add a syntax for pragmas, but in the meantime anyone who wants to experiment can use a syntax like {! identifier … !} for pragmas, with the result that other processors will just ignore them as comments.

2 I think (again subject to refutation) that attribute or affix grammars may be very helpful here in providing a well worked out theory to underpin the story.   

Perhaps all this means is that if we can find a way to explain text injection and other things in terms of an attribute grammar, it will feel less ad hoc and more rational.  But attribute grammars also provide a very clean story about the way a context free grammar can co-exist with additional information and additional rules and constraints.  (And because affix grammars are, ultimately, derived from van Wijngaarden grammars, they may fit very nicely here.  I need to brush up on how the affix grammar and an underlying context free grammar relate.)


This may be too cryptic, in which case I apologize.  But I am hoping it will be enough to spark some thoughts.

Michael

********************************************
C. M. Sperberg-McQueen
Black Mesa Technologies LLC
cmsmcq@blackmesatech.com
http://www.blackmesatech.com
********************************************
Received on Tuesday, 11 May 2021 16:55:19 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 13 September 2022 10:02:05 UTC