Re: A really micro schema language

On Tue, Dec 18, 2012 at 5:39 PM, John Cowan <cowan@mercury.ccil.org> wrote:

>
> > An img element must have a src attribute whose value has the url
> datatype.
>
> This lacks a syntax example: perhaps "img @src=url"?
>

Yes, that was the syntax.

>
> >   a @ href
> >
> > The a element may have an href attribute.
>
> I would therefore read this as "The a element must have an href attribute"
>

I think I buy that.  This language is aiming for pragmatism rather than
theoretical elegance.  Maybe

  a @ href?

The a element may have an href attribute.

  a @ href? = url

  (or a @ href = url?)

If the a element has an href attribute, it must be a url.

James

Received on Tuesday, 18 December 2012 11:00:54 UTC