[Thread Prev][Thread Next][Index]

Re: Experienced problem w/ <optiondef> tag



Hi Jean-Marie,
It is true that an option may only be defined once in the options.xml. The way to handle this is with the optiondef element attribute inherit="optiondef". As of LAS v6.4 the value of the inherit field can be a comma-separated list of optiondef names. Consider the following example.
<optiondef name="Optiondef_1">
<option>
<help>Option A information</help>
<title>Option A</title>
<menu type="options" name="option_a">
<item values="default">Default</item>
<item values="1">Yes</item>
<item values="0">No</item>
</menu>
</option>
</optiondef>

<optiondef name="Optiondef_2">
<option>
<help>Option B information</help>
<title>Option B</title>
<menu type="options" name="option_b">
<item values="default">Default</item>
<item values="1">Yes</item>
<item values="0">No</item>
</menu>
</option>
</optiondef>

<optiondef name="Optiondef_3" inherit="#Optiondef_1,#Optiondef_2">
<option>
<help>Option C information</help>
<title>Option C</title>
<menu type="options" name="option_c">
<item values="default">Default</item>
<item values="1">Yes</item>
<item values="0">No</item>
</menu>
</option>
</optiondef>

Optiondef_3 will then refer to Option A, Option B, and Option C.

Joe
-------------------------------------

J-M Epitalon wrote:

Hi all,

I installed LAS 6.4 on Linux RedHat 9.

I have a class of datasets for which I plan to set specific options.
Actually, I have to sets of options: one for plotting and one for
retrieving the data.

I added in options.xml two option sets, inheriting from DefaultOptions
and DefaultDataOptions.
Then, in each of these two sets, I included the same option menu: <menu type="options" name="simulation_no">

When compiling the XML files, I get the following error message:
======================
make
../xml/perl/genLas.pl las.xml
DB host: []
DB login name: [root]
DB password: []
Serializing file:/usr/local/las/server/las.xml to database
Building indexes...
Resolving links...
Duplicate menu name: simulation_no at ../xml/perl/LASUI.pm line 186.
make: *** [../ui/config.js] Error 255
=======================

Could you help me, please ?

Jean-Marie Epitalon
CERFACS, Toulouse, France



[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement