zepheira / exhibit3

Simile Widgets Exhibit 3 code repository
http://simile-widgets.org/exhibit3/
MIT License
161 stars 48 forks source link

Consistently handling whitespace in property names #74

Open karger opened 12 years ago

karger commented 12 years ago

In a data file, property names that contain spaces are parsed with those spaces, so we can have properties such as "Last Name". However, when expressions are parsed in exhibit (e.g., ex:expression="Last Name"), the parser skips over white space. It thus becomes impossible to actually refer to a property containing spaces. This should be resolved. One option would be for the data parser to elide spaces in property names (possibly preserving the name with spaces as the "label" for the property). Another option would be to specify that e.g. underscores in expressions (and possibly in property names) are interpreted as spaces.

karger commented 11 years ago

Small correction: a white space causes the expression parser to halt and output a token; it doesn't elide whitespace.

This is a real problem for people filling exhibits from google spreadsheets/forms, where it is natural to use multi-word column headings.

karger commented 11 years ago

I haven't been able to think of any case where making the expression parser whitespace sensitive on property names would suddenly break it. Since the current implementation chokes on whitespace in expressions, this should be strictly more robust.