Re: Proposed extension of data model

On Sun, Nov 18, 2012 at 10:22 AM, John Cowan <cowan@mercury.ccil.org> wrote:

> James Clark scripsit:
>
> > I would like to change the Data Model section of the spec to separate out
> > the aspects of the data model that are purely there as a result of the
> > syntactic constraints of MicroXML.
>
> Fair enough.  In that case, I propose that the following text in Section 2
> of the current draft:
>
>     A name item is a non-empty string. The first character in the
>     string MUST match the production nameStartChar, and any subsequent
>     characters MUST match the production nameChar. In addition, a name
>     item occurring as a key in an attributes map MUST not be xmlns.
>
>     Any character occurring in the value of an attributes map or as
>     a member of a content list MUST match the production char.
>
> be reduced to the first sentence only.
>

I was thinking of something along the following lines.

Note that this data model is intended to be useful not just for MicroXML.
> For example, it can also be used to represent XML or HTML documents.
> When the data model results from parsing a MicroXML document, it will
> satisfy the following restrictions:
> - the first character in a name item will match the production
> nameStartChar;
> - the second and subsequent characters in a name item will match the
> production nameChar
> - a name item occurring as a key in an attributes map will not be xmlns
> - a character occurring in the value of an attributes map or as a member
> of a content list will match the production char.


James

Received on Sunday, 18 November 2012 07:33:36 UTC