Re: A really micro schema language

It feels to me that the question mark should go in the same place the bang
was for negation.  So

a ?@ href = url

Would specify an optional href attribute that had to be a url.

I want to say that the rules for / should be the same as the rules for @,
but I'm not sure what it would mean to have a required child element.  And
it would almost always be used as ?/, so that would be awkward.

Should there be a !@ to specify that an attribute is disallowed?
On Dec 18, 2012 3:55 AM, "James Clark" <jjc@jclark.com> wrote:

> On Tue, Dec 18, 2012 at 5:38 PM, Michael Kay <mike@saxonica.com> wrote:
>
>>
>> For such clauses to be useful to an editor, of course, it would have too
>> look for common patterns in the XPath expression to recognize things such
>> as enumerations; but that's not demanding too much, I think.
>>
>
> I would like to handle enumerations in the base language, eg
>
>   define @ combine ?= (choice, interleave)
>
> for an optional attribute named "combine" which must the value "choice" or
> "interleave".
>
> James
>
>
>
>
>
>

Received on Tuesday, 18 December 2012 16:56:02 UTC