Re: Error recovery

On Wed, Dec 5, 2012 at 5:22 PM, David Carlisle <davidc@nag.co.uk> wrote:

> On 05/12/2012 08:37, James Clark wrote:
>
>> or (more likely?) by redefining valid name tokens in the data model
>> to be unconstrained arbitrary strings.
>>
>>
>> I still prefer this option.
>>
>
>
> yes I think I a coming to that view too, but would prefer that the data
> model part of the micro-xml spec acknowledges that rather than this
> parser generating something that is in no-mans land specification wise.


On the other hand, there is something weird about a data model that calls
itself the "MicroXML" data model not always being able to be represented in
MicroXML syntax.

Here's another possible approach to slicing things up:

1. Define the relaxed data model in a separate specification, say, Simple
Markup Language Data Model (SMLDM). This would

- define the data model (same as in the MicroXML spec but without the
constraints on names and data characters)
- define the JSON syntax
- define the mapping to the XML infoset
- explain that it can be used for MicroXML, XML 1.0 (various editions), XML
1.0 + XML Namespaces, HTML, Markdown etc

2. The MicroXML spec references SMLDM and says that the MicroXML data model
is SMLDM plus constraints on names and data characters.

3. The MicroXML error recovery spec references SMLDM and says that in
general it produces SMLDM but there's an optional fixup stage that can make
it comply with the constraints of the MicroXML data model.

James

Received on Thursday, 6 December 2012 01:52:01 UTC