Re: Default Option Values

/ Alex Milowski <alex@milowski.org> was heard to say:
| On 5/23/07, Norman Walsh <ndw@nwalsh.com> wrote:
|> / Alex Milowski <alex@milowski.org> was heard to say:
|> | We have many steps where there is an option with an implied
|> | default value.  In my write-up, I assumed the p:option element can
|> | have default values but it does not.
|>
|> Uhm...
|>
|>   5.7 p:option Element
|>
|>   The p:option element is used both to declare options and to establish
|>   values for them. It can occur in three contexts:
|>
|>    1. On p:declare-step, it declares that the step accepts the named
|>       option. It may also provide a default value for the option.
|>
|> Isn't it sufficient to say <p:option name="foo" value="bar"/> on the
|> p:declare-step?
|
| It doesn't look like that is valid from how I'm reading the spec in that
| the 'value' attribute isn't allowed for declarations.
|
| It seems like a simple thing to fix.

  5.7.1 Declaring Options

  Options are declared on p:declare-step with p:option:

  <p:option
    name = QName
    required? = yes | no />

  [...]

  An option may be declared as required or it may be given a default
                                                     ---------------
  value. It is a static error (err:XS0017) to specify that the option
  -----
  is both required and has a default value.

The text "given a default value" is a link to the following section
which describes how to do it. It's true that the little syntax summary
for declaring options doesn't include the value attribute, but it'd be
tedious to include the value and/or select attributes and/or content
in that summary, I think.

I don't think the spec is unclear but I'd be happy to hear suggestions
about how to improve it.

                                        Be seeing you,
                                          norm

-- 
Norman Walsh <ndw@nwalsh.com> | Everything has been said before, but
http://nwalsh.com/            | since nobody every listens we have to
                              | keep going back and beginning all over
                              | again.--André Gide

Received on Wednesday, 23 May 2007 14:18:01 UTC