Skip to content

Bugs in DAP4 Data Request Form constraint expression construction #262

Description

@jgallagher59701

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


Overview

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

Issue: Wrong Variable Name

When the xslt/javascript writes the DAP variable name into the constraint expression the value used 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.

Issue: 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?? Perhaps "/" , "[", and "]" are likely culprits...) then the name must be double quoted between the path separating "/" characters.

Example:

Consider a group named PM_2.5 with a child variable named PM_2.5_Sulfate_uncertainty. The child variable should appear in a DAP4 constraint like: dap4.ce=...;/"PM_2.5"/"PM_2.5_Sulfate_uncertainty";...

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions