Re: more examples of namespaces needed in output (was: Re: call a week from today, right?)

Note that these examples add new requirements to ixml.


The defining, and explicit, requirement for ixml was getting parsable context-free documents into XML, so that they could be inserted into the XML pipeline. It was explicitly not to replicate existing XML document types in a non-XML form, even less to transform existing non-XML formats into existing XML formats. There are already tools for transformation, and we should very carefully evaluate to what extent we want to duplicate those. 


Here is a list of some requirements we could add:
* adding content to the serialisation that is not in the input (e.g adding a class attribute to an element)
* replicating existing XML document types
* transforming existing non-XML formats to existing XML document types
* handling non-context-free languages.


Examples of non-context-free languages:


* Any language that includes a count telling you how many of a thing follow, for instance FORTRAN with Hollerith constants
* Python (the indentation is non-context-free)
* XML (the requirement that the closing tag match the opening tag is non-context-free, though you can make this a semantic requirement).


We should monitor carefully that we don't get feature drift without first testing features against the requirements.


Steven




On Monday 12 April 2021 23:48:12 (+02:00), Tom Hillman wrote:


Well, any grammar that describes an XML instance with namespace support; how about converting to xhtml 5 using a grammar for markdown?

Or grammars for converting mathematic expressions in mathml?

Using a prefix as the non terminal name isn’t really enough on its own: there needs to be a way of associating a URI for the namespace.

I would support extending the attribute syntax, in a way which mirrors the XML syntax; something like:

xmlns:   “http://www.w3.org/1999/xhtml”
xmlns:m: “http://www.w3.org/1998/Math/MathML”

Other elements or attributes can then be associated with a namespace by the existence (or otherwise) of a prefix.

This is potentially significant for parsers, since to correctly create the required element, the namespace declarations will have to be parsed first.

Like many things namespace, there's clearly a lot of potential for ugliness here.  But I feel that's an argument to tie things down now rather than leave it much longer!

Tom


_________________
Tomos Hillman
eXpertML Ltd
+44 7793 242058
On 12 Apr 2021, 6:52 PM +0100, C. M. Sperberg-McQueen , wrote:




On 12,Apr2021, at 4:49 AM, Tom Hillman <tom@expertml.com> wrote:

I may be a little late tomorrow, but could we make some time to talk about specifying namespaces/declarations? I feel that this is a necessary (if ugly) feature that is currently conspicuous by its absence from the spec!



Do you have a motivating example? Concrete cases might help think of non-ugly ways to provide the necessities.

Michael

********************************************
C. M. Sperberg-McQueen
Black Mesa Technologies LLC
cmsmcq@blackmesatech.com
http://www.blackmesatech.com
********************************************

Received on Tuesday, 13 April 2021 11:21:50 UTC