Re: experiment for namespace declaration and text injection

Current ixml specification [1] says: "it is the grammar author's
responsibility to ensure that all serialized names match the requirements
for an XML name." If this implies the grammar author should keep in mind
that names starting with 'xml' are reserved in XML [2], then 'xmlns'
attributes could be used for namespace prefix binding.


A parser MAY treat xmlns attribute as a default namespace binding:


    @xmlns: +'http://example.org/eixml <http://example.org/eixml%7Dinject>'


A parser MAY treat xmlns:... attribute as a namespace prefix binding:


    @xmlns:xsl: +'http://www.w3.org/1999/XSL/Transform'


But here comes an issue. This approach needs text injection to be local to
the containing element, because for another element @xmlns may have another
value. May ixml have context-sensitive elements?


This reminds me of XML-based formats using the same name for semantically
different things. For example, JDF process nodes [3] have Type and Status
attributes. At the same time, JDF notifications have Type attributes and
JDF resources have Status attributes. Value range, meaning, and usage of
Type or Status attribute in JDF depend on the parent element. The illusion
of all people thinking the same way makes me anticipate a number of ixml
extensions introducing context-sensitive non-terminals. Examples are
'JDF.Type', 'Type@Notification', and 'Resource::Status'.


Other extensions may separate XML names from ixml non-termial names:


    JDF: @Type: processType, @Status: processStatus.

    processType: ... .

    processStatus: ... .

    Resource: @Status: resourceStatus.

    resourceStatus: ... .

    Notification: @Type: notificationType.

    notificationType: ... .


Am I missing something in ixml specification that allows the separation of
XML node names from ixml non-terminals?


As far as I understand, the minus mark works in one direction only. It
allows multiple names for the same thing:


    quantity: @unitOfMeasure, -number.

    mass: -quantity.

    length: -quantity.


Aleksei


[1] https://homepages.cwi.nl/~steven/ixml/ixml-specification.html
[2] https://www.w3.org/TR/xml/#sec-common-syn
[3] https://confluence.cip4.org/display/PUB/JDF

Received on Monday, 5 July 2021 10:14:42 UTC