Talk:Server-side Functions: Difference between revisions
From OPeNDAP Documentation
⧼opendap2-jumptonavigation⧽
RobDeAlmeida (talk | contribs) |
RobDeAlmeida (talk | contribs) |
||
Line 8: | Line 8: | ||
=== Capabilities response === | === Capabilities response === | ||
This is a plain old xml response, inspired by [http://xins.sourceforge.net/ XINS]. Parameters are positional, and always required: | |||
<functions xmlns="http://xml.opendap.org/ns/SSF"> | |||
<function name="mean"> | |||
<description>Calculates mean over axis between two points.</description> | |||
<input type="Grid"> | |||
<description>The name of the variable to be averaged.</description> | |||
</input> | |||
<input type="String"> | |||
<description>The name of the axis.</description> | |||
</input> | |||
<input type="Float64"> | |||
<description>The initial value of the averaging; defaults to the first value on the axis.</description> | |||
</input> | |||
<input type="Float64"> | |||
<description>The last value of the averaging; defaults to the last value on the axis.</description> | |||
</input> | |||
<output type="Grid"> | |||
<description>A new Grid with a degenerated axis.</description> | |||
</output> | |||
</function> | |||
</functions> | |||
Problems: how do we specify more than one type of input type allowed? I can think of: | |||
<input type="Grid Array"> | |||
But the list could get big quickly if we want to list <code>Int32</code>, <code>UInt16</code>, etc. It would be nice to have a shortcut to the base types: | |||
<input type="Array Base"> | |||
With <code>Base</code> meaning all the base types. | |||
=== Syntax specification === | === Syntax specification === | ||
=== Standard list of functions === | === Standard list of functions === |
Revision as of 23:21, 17 November 2007
Tentative specification
This is a first tentative specification, just to see how far we can go with the ideas alreay in mind. Feel free to change, edit, adapt, modify or leave comments. --RobDeAlmeida
Capabilities introspection
Capabilities response
This is a plain old xml response, inspired by XINS. Parameters are positional, and always required:
<functions xmlns="http://xml.opendap.org/ns/SSF"> <function name="mean"> <description>Calculates mean over axis between two points.</description> <input type="Grid"> <description>The name of the variable to be averaged.</description> </input> <input type="String"> <description>The name of the axis.</description> </input> <input type="Float64"> <description>The initial value of the averaging; defaults to the first value on the axis.</description> </input> <input type="Float64"> <description>The last value of the averaging; defaults to the last value on the axis.</description> </input> <output type="Grid"> <description>A new Grid with a degenerated axis.</description> </output> </function> </functions>
Problems: how do we specify more than one type of input type allowed? I can think of:
<input type="Grid Array">
But the list could get big quickly if we want to list Int32
, UInt16
, etc. It would be nice to have a shortcut to the base types:
<input type="Array Base">
With Base
meaning all the base types.