Skip to content

Bugs in DAP4 Data Request Form constraint expression construction #262

@jgallagher59701

Description

@jgallagher59701

Originally from https://bugs.earthdata.nasa.gov/browse/HYRAX-1070


I found that when the DAP4 Data Request Form builds the constraint expression it has (at least!) the following two issues.
h2. Wrong Variable Name

When the xslt/javascript writes the DAP variable name into the constraint expression the value used (incorrectly) has had any "." characters replaced with "_". This is probably a simple fix - I think in the JavaScript code the variable name for the DAP variable uses this substitution to make the data variable name valid for a java script variable name.
h2. Constraint expression incorrectly constructed.

When a variable or group name is included in a DAP4 constraint, and the name contains one or more "." characters (others?? "/" , "[", and "]" are likely culprits) then the name must be double quoted between the path separating "/" characters.

For example:
{quote}Consider a group named {{PM_2.5}} with a child variable named {{{}PM_2.5_Sulfate_uncertainty{}}}. The child variable would appear in a DAP4 constraint like: {{dap4.ce=...;/"PM_2.5"/"PM_2.5_Sulfate_uncertainty";...}}
{quote}
So we need to add some code in the appropriate place to check the variable/group names for "." (and possibly other reserved characters - Ask [~jhrg]) and when found wrap the variable/group name in double quotes as show above.

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions