gazebosim / gazebosim/sdformat
Converter::Map only maps first of sibling elements
- Dominant language
- C++
- Stars
- 216
- Forks
- 125
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 14
Description
**Original report ([archived issue](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/issues/222)) by Steve Peters (Bitbucket: [Steven Peters](https://bitbucket.org/%7B2ccfed09-18b8-4921-8d58-15ef01092802%7D/), GitHub: [scpeters](https://github.com/scpeters)).**
----------------------------------------
The `Converter::Map` functionality was added to libsdformat9 in [pull request #580](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/580). It maps values from elements/attributes into other elements/attributes. It is currently limited to only mapping the first of sibling elements of the same type.
For example, consider the following xml from a `.convert ` file:
~~~
d
D
f
F
~~~
that operates on the following xml:
~~~
D
D
d
d
~~~
Currently it only maps the first element, so the output would be the following (all the original `elemD` elements plus one new `elemF` element):
~~~
D
D
d
d
F
~~~
I've added a failing test to the following branch that expects all sibling elements to be mapped in the converted xml:
* https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/branch/converter_map_multiple_siblings
Contributor guide
Research direction
Start with the failing test on the converter_map_multiple_siblings branch and inspect the Converter::Map functionality described in the issue. Confirm that converting repeated sibling elements maps all matching elements, including the expected elemF outputs, rather than only the first one.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100