Next in thread → Next in month →

RE: Issue: are <optional>, <oneOrMore>, <zeroOrMore> verbose?

From
James Clark <>
Date
2001-07-10T23:58:22+00:00
ID
Thread
RE: Issue: are <optional>, <oneOrMore>, <zeroOrMore> verbose?
You can already say:

<optional>
  <attribute name="foo"/>
  <attribute name="bar"/>
</optional>

but it means you can have either both foo and bar or nothing, just as if 
you used <element/> instead of attribute.

--On 10 July 2001 09:20 -0700 Michael Fitzgerald <> wrote:

> "Terseness is of minimal importance." XML is verbose. Element heavy RELAX
> NG is verbose. I hope our syntax is clear and immediate if verbose. On
> principle, I prefer clear and verbose over terse and arcane.
>
> To me this syntax is fine and dandy:
>
> <optional>
>   <attribute ..></attribute>
> <optional>
>
> I wish for:
>
> <define name="commonAttributes">
> <optional>
>   <attribute ..></attribute>
>   <attribute ..></attribute>
>   <attribute ..></attribute>
>   <attribute ..></attribute>
>   <attribute ..></attribute>
>   ...
> <optional>
> </define>
>
> based on the same principle, but I am ignorant of any processing
> entanglements this might introduce.
>
> Mike
>
> -----Original Message-----
> From: Murata Makoto [mailto:]
> Sent: Thursday, July 05, 2001 12:30 AM
> To: 
> Subject: Issue: are <optional>, <oneOrMore>, <zeroOrMore> verbose?
>
>
> Currently, to declare optional attributes, we write
>
> <optional>
>   <attribute ..>
>   </attribute>
> <optional>
>
> To declare a collection of many optional attributes, we write
>
> <define name="commonAttributes">
> <optional>
>   <attribute ..>
>   </attribute>
> <optional>
> <optional>
>   <attribute ..>
>   </attribute>
> <optional>
> ...
> <optional>
>   <attribute ..>
>   </attribute>
> <optional>
> </define>
>
> Isn't this verbose?
>
> Quite a few people in the XML Schema WG think that elements for */+/? are
> too verbose and have chosen "maxOccurs"" and minOccurs".  RELAX Core has
> chosen
> "occurs".
>
> Cheers,
>
> Makoto
>
> ------------------------------------------------------------------
> To unsubscribe from this elist send a message with the single word
> "unsubscribe" in the body to: 
>
>
> ------------------------------------------------------------------
> To unsubscribe from this elist send a message with the single word
> "unsubscribe" in the body to: 
>
>
Next in thread → Next in month →