OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] "Introducing MicroXML, Part 1: Explore the basicprinciples of ...

James Clark scripsit:

> But if you put arbitrary PIs in the data model, you are, of course,
> significantly complicating things (going from 2 kinds of content to
> 3).

What is worse, you go from Element objects to Document, PI, and Element

> The start-tag syntax restriction also means you can't encode arbitrary
> XML infosets.


> - allow PIs only before the root element (and perhaps only before the
> DOCTYPE if there is one), probably with the start-tag syntax
> restriction

How about placing them under, rather than adjacent to, the root element?
There is no real semantic distinction between one and the other, and
that would eliminate the need for a separate Document object in the model.

> - encode elements differently: an element is represented by a JSON
> object, with each attribute represented as a property of the object;
> the element name and content would be represented by properties whose
> name starts with "$", so  that are not legal XML names but are legal
> JavaScript identifiers eg $name/$content or something shorter.

The content should be just $, I think.  But I really hate to introduce
yet another mapping from XML to JSON; at least the ones I document already
exist and have some support behind them.

> - encode PIs before the root element as a "$" prefixed property of the
> root element eg $pi

This corresponds to what I mentioned above.

> - consider adding DOCTYPE to the data model as well using similar
> techniques (not sure about this, but it's going to be difficult for
> serializers to know whether to output a DOCTYPE otherwise)

I think that should be an implementation-level switch rather than
something in the data model, since it depends on the context in which
the MicroXML document is to be consumed.

Ambassador Trentino: I've said enough. I'm a man of few words.
Rufus T. Firefly: I'm a man of one word: scram!
        --Duck Soup                     John Cowan <cowan@ccil.org>

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS