Re: Attribute values

On Tue, Aug 14, 2012 at 8:39 AM, Murray Maloney <murray@muzmo.com> wrote:

> I noticed that attribute values are defined thus...
>
> attributeValue ::= '"' ((dataChar - '"') | charRef)* '"'
>                   | "'" ((dataChar - "'") | charRef)* "'"
>
> So, attributes may take the form foo="bar" or foo='bar' but not foo=bar
>
> I further note that this definition does not distinguish between strings
> and tokens, by which I mean those sequences which contain spaces and those
> which don't.
>
> It seems that data types are not in scope for uXML, but I think that it
> could still be helpful to distinguish among strings and tokens, so as to
> allow foo=bar as a legitimate form of attribute value assignation.
>

Unfortunately foo=bar syntax would break backward syntactical compatibility
pretty badly.  FWIW I do also wish XML 1.0 had supported that syntax,
rather than just giving lip service to NMTOKENS.



> Frankly, I would like to see data types baked into XML, by way of a
> corrigendum if necessary, but that is another discussion.
>

Hmm. Remember that we are likely to develop a separate, schematic layer for
MicroXML, perhaps based on Examplotron or RELAX NG.  Don't you think it
would be better to leave (very lightweight and generic) data typing to that
layer?


-- 
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 14:51:20 UTC