Re: Pragma Proposal ready for review

Comments on pragmas document.

2021-12-14

# Pragmas

[ref doc](https://github.com/invisibleXML/ixml/blob/proposal-pragmas/misc/pragmas.md)
13 Dec 2021 revision

Comments, Dave Pawson.

(Potential) issue, circularity? A mods B mods A? Can this be addressed?

Namespace declarations: Applicability (xml rules apply?), how is scope
related to the generated XML?

At what point is ixml validation 'assumed'? Post pragma application?
Where stated?

"Some of these use cases seem most naturally handled by annotations
which apply to a grammar as a whole, some by annotations which apply
to individual rules, and some by annotations which apply to individual
symbols in the grammar."  I don't find this clear, I don't understand
its implication.

Is the 'fallback' action(expression) implementable? If a processor fails to
'understand' a pragma? Is it the same action expected of every pragma
not understood?

3rd desiderata: Superficially this would appear (to me) as pure magic?
I don't understand it, yet I'm expected to produce XML from it?

Design questions: Could pragmas be 'associated with' (external to) a
grammar as apposed to within it? How to 'point to' the modified
grammar element?

If a pragma results in a non-wellformed  XML output, is that a user issue?


## The brackets-QName proposal


Scope issue: "Serializing a nonterminal as an element or attribute
whose name is taken not from the grammar (as in ixml as currently
specified) but from the input data." Implies that pragmas scope
extends beyond ixml to other data sources? Is this a required
complexity? I'd vote against this.

Fixed form: [? qname
Variable form:

"all pragmas have the same representation in XML grammars."  Is this a
valid statement?

"The xml form of pragmas" - is this of use to a user? First
introduction, I'm unsure if / when it may be of use.

"Any pragma recognized can be written out in ixml notation. " A bit
tautological? Surely it needs to be written out in ixml notation to be
recognised?

## Worked examples

"... and that namespace bindings should remain constant throughout the
grammar " Now that would be helpful :-)

"a pragma-aware processor " First mention - should be defined, also
action on a non-aware processor finding a pragma

"at least one thing must be specified in the spec for the
bootstrapping process to work: either a magic prefix, analogous to the
xmlns prefix of the XML Names recommendation" Seems a sensible way of
processing, to (re)use xmlns? +1 from me.

"We can do this in ixml by expanding the grammar, splitting each
nonterminal into two rules, one producing a visible serialization and
one hiding the nonterminal on serialization." Is this desirable |
needed? Perhaps nice if it can be automated + hidden from the user.


### Text injection

"To express this grammar in ixml, we need either (1) to allow multiple
rules for the same nonterminal, or (2) to allow pragmas before
connectors like comma or semicolon, or (3) we need to allow
string-to-typed-value functions in the style of XPath. " Another tweak
of the ixml grammar? Could this be implemented without such a tweak?
What's the relative value added vs the saving in typing (or macro
execution).



## Open issues

Question: If (generally) the issue is that the full extent of XML
cannot be achieved from ixml, then IMHO that's fine. Please don't let
corner cases bug you. "Con: things are complicated enough as it is. "
Quite agree. KISS?

## Decisions

Third: Ask W3C (who?) and if agreed, use xmlns (well understood).

Fourth: +1 to using "http://www.w3.org/2000/xmlns/" or even /2021
heaven forfend.



Summary: I don't pretend to comprehend some of the issues above. It
appears to me akin to moving from rng to xsd. I do hope others see it
as being of **user** benefit.


regards Dave P

On Mon, 13 Dec 2021 at 18:58, C. M. Sperberg-McQueen
<cmsmcq@blackmesatech.com> wrote:
>
> Please read the pragmas proposal!
>
> It’s been six days and I haven’t seen any comments or questions from
> anyone on the pragmas proposal.
>
> That might be because the proposal is so well thought out that
> everything just works, and the document is so perfectly worded
> that everything is clear.  Might be.  But my money is on a different
> explanation.
>
> Please do try to read the proposal (pragmas.md in the misc/ directory
> on the proposal-pragmas branch) before the call:  it is way too long
> to scan it during the call, and if we want to do as Tom suggested
> and issue a 1.0 document including pragmas in time for XML Prague,
> then we need to deal with this proposal on tomorrow’s call.
>
> Michael
>
>
> > On 7,Dec2021, at 10:15 AM, Tom Hillman <tom@expertml.com> wrote:
> >
> > Hi folks,
> >
> > The proposal for pragma that Michael and I have been working on for some weeks is now ready for review in advance of our meeting next week:
> >
> > https://github.com/invisibleXML/ixml/pull/10
> >
> > Our hope is that this will give us a clear idea of which minimal features of pragma would need to be supported for a 1.0 release of iXML so that
> >       • Pragma implementers will be able to do something useful with them in the future,
> >       • non-pragma supporting processors know enough to know what they can ignore for "fallback" behaviours.
> > To that end, the proposal details
> >       • Identified Requirements and Desiderata
> >       • A proposed syntax
> >       • Several use cases with worked examples
> >       • Suggested updates to the iXML grammar
> > Our hope is that we can make a decision on whether or not we include any pragma considerations for a release at XML Prague, if we decide that such a release is a goal of the group; if we do decide to do both of those things, I would like to (co-)write a paper as part of making a noise for release.
> >
> > Next week's meeting is shaping up to be quite busy, so if folk could possibly take a look in advance, it might save us some precious time on the day!
> >
> > Thanks,
> > Tom
> >
> > _________________
> > Tomos Hillman
> > eXpertML Ltd
> > +44 7793 242058
>
>


-- 
Dave Pawson
XSLT XSL-FO FAQ.
Docbook FAQ.

Received on Tuesday, 14 December 2021 09:06:14 UTC