re: [] or ? for optional

From
David RR Webber <>
Date
2001-07-10T03:24:00+00:00
ID
Thread
re: [] or ? for optional
Message text written by James Clark
>If you read this, please send a message to the list saying whether you are

familiar with the use of [] for optionality and would guess that the square

brackets in

<value [type="NCName"]>string</value>

indicate that the attribute is optional.

Alternatively we could try to make it harder to miss the ? by adding 
parentheses

<value (type="NCName")?>string</value>

James<

>>>>>>>>>>>>

James,

You can also add annotation to denote this!

Putting the items inside the  [in italics] is also a better visual hint .

D[RR]W.