Re: Subset Data Model

On Mon, Aug 13, 2012 at 7:33 PM, James Clark <jjc@jclark.com> wrote:

>
>> I would rather start with the XPath data model than the Infoset, though
>> since you say a profile of the Infoset, that might be the same thing in
>> practice.
>>
>
> One reason for using the infoset rather than XPath 1.0 is that it provides
> [prefix] and [namespace attributes] properties that allow us to ignore the
> effects of namespace processing.
>
> The subset I believe we need is
>

This is good. Just noting the issues as I remember them which have emerged
between the Clark and Cowan MicroXML drafts.


> document[document element]
>

John has been trying to avoid a document node.  Certainly one would be
required if:

* PIs are reported in some way, unless one goes with the hack (sorry, but
it is a hack) of allowing them top level only, but reporting them on the
doc element.
* We support multiple root elements. This has been suggested and discussed,
but I would recommend we put it aside for now

So if we deferred on PIs, could we experiment with the idea of no document
element?


> element[local name, prefix, children, attributes, namespace attributes]
>

John's draft supports prefixed attributes, but not elements, so I believe
his version would be:

element[local name, children, attributes, namespace attributes]

attribute[local name, prefix, normalized value]
> character[character code]
>

And just like that, we could be pretty close!

Some of the thorny issues of course lie in whether/how we would then
augment this basis with added bits for syntactic transforms (e.g.
HTML5-savvy output of empty elements).  But we can tackle all that in a
later iteration.


-- 
Uche Ogbuji                       http://uche.ogbuji.net
Founding Partner, Zepheira        http://zepheira.com
http://wearekin.org
http://www.thenervousbreakdown.com/author/uogbuji/
http://copia.ogbuji.net
http://www.linkedin.com/in/ucheogbuji
http://twitter.com/uogbuji

Received on Tuesday, 14 August 2012 01:50:25 UTC