gazebosim / gazebosim/sdformat
`<include>` should only be allowed in `<world>` or `<model>`
- Dominant language
- C++
- Stars
- 216
- Forks
- 125
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 14
Description
## Environment
* OS Version: all
* Source or binary build? all
## Description
* Expected behavior: Using the `` tag in elements other than `` and `` should emit errors and not try to insert the included file as a child of any parent element. The `` tag is defined in the `world` and `model` spec files.
* Actual behavior: No error is emitted when using `` in elements such as `` or ``.
## Steps to reproduce
1. Save the following to `include_test.sdf`:
```xml
test_model
```
1. Set `SDF_PATH` to the directory containing `test_model`
```
export SDF_PATH=/test/integration/model
```
1. Run `gz sdf -k include_test.sdf`. The output is `Valid.`
1. Run `gz sdf -p include_test.sdf`. The output is the following:
```xml
meshes/mesh.dae
my_submesh
true
0.10000000000000001 0.20000000000000001 0.29999999999999999
meshes/mesh.dae
another_submesh
false
1.2 2.2999999999999998 3.3999999999999999
test_model
```
Note the `` inside `` which is invalid.
Contributor guide
Assessment
This issue has not been assessed yet.