[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: Re: Issue: are <optional>, <oneOrMore>, <zeroOrMore> verbose?
> On the other hand, I do think that > > <optional> > <attribute name="foo"> > ... > </attribute> > </optional> > > is verbose, especially when this is repeated again and again (how do > others feel?). So your measure of verbosity is "number of lines when traditionally indented"? > Here are some suggestions. > > 1) a new keyword (syntax sugar) > > <optionalAttribute name="foo"> > ... > </optionalAttribute> > > which is equivalent to: > > <optional> > <attribute name="foo"> > ... > </attribute> > </optional> I could live with this, if others thing we have a verbosity problem here. > 2) recommends a convention in the tutorial > > <zeroOrMore> > <choice> > <attribute name="foo1"> > ... > </attribute> > <attribute name="foo2"> > ... > </attribute> > <attribute name="foo3"> > ... > </attribute> > <attribute name="foo3"> > ... > </attribute> > ... > </zeroOrMore> This seems a little bit too tricky for my taste. I also wouldn't mind an attribute on <attribute> indicating optionality, eg <attribute name="foo" use="optional"/> <optional> is sugar anyway. The thing I really don't want to do is use attributes for <oneOrMore> or <zeroOrMore>. James
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC