-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposal: Pragmas #10
base: master
Are you sure you want to change the base?
Conversation
as a basis for demonstrating how to use github and PRs to collaborate on a proposal.
Add missing close quotation for eg namespace in example of pragmas
On the subject of syntax, I'll just observe that the compact syntax for Relax NG uses square brackets as the delimiter, with considerable flexibility about what can go in the annotation. You might, in this style, cast Michael's green/blue example like this:
|
I like @ndw's syntax idea; it also has the consequence that pragmas can nest without contortions in the surface syntax. The basic principle of XQuery pragmas seems sound: a pragma P is always followed by an expression E (bracketed, in XQuery), with the meaning 'if you understand P, do what you need to do with P and E; if you don't understand P, evaluate E normally'. It's not so dramatic and not so unitary in XSLT, but there is a similar pairing of things a processor may or may not understand and identifiable things in standard syntax: if you don't know how to evaluate this thing from v.Future, evaluate this xsl:fallback element. I am coming to think there are three use cases, syntactically speaking, which may require some thought to handle gracefully with a single mechanism (or what feels to the user like a single mechanism):
For discussion purposes, I think this nets out to the following proposal, which has taken form in my mind as I wrote this reply to Norm:
|
Draft document to summarize pragma issues (and help MSM stop forgetting what we've already discussed).
Provide a bit more prose.
I hate Markdown.
Some copy edits and begin a new example
Copy edit, revise proposal to allow grammar-attached pragmas, revise namespaces example, supply renaming and rewriting examples, finish tokenization example, add lists of open issues and decisions for the group.
Add an open issue
Add an open issue and a decision for the group
One more copy-editing pass
I hate MarkDown.
one more copy-editing pass (but slacked off at the end)
Minor copy edits
Prose revision for the prolog.
Small copy-edit
Delete the bits that say this is not yet finished. It's as finished as it is going to get.
First version of this abbreviated proposal
Revised (and made longer, sigh)
Add a claim to adequacy. Also a revision date.
The pragma-data element is not always required.
Markdown claims another victim.
More copy editing
Add status note
Further copy edits, typo corrections.
Markdown is so simple and intuitive! It's perfectly obvious how to embed a code block within a paragraph within a list item. I cannot understand how anyone could fail to prefer Markdown to systems with explicit markup. Who can understand those?
Copy edits
Correct the revision date.
… into proposal-pragmas
This is a
draftproposal for adding pragmas to the invisible XML Grammar.Details of the proposal are in
misc/pragmas.md
, with changes to the invisible XML made to the grammar.