Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[generator] Fix <remove-attr/> metadata (#999)
Fixes: #976 Given an `api.xml` element like: <package name='my.package'> <class name='MyClass' api-since='29' /> </package> One would expect to be able to remove the `class/@api-since` attribute with this metadata: <remove-attr path='/api/package[@name='my.package']/class[@name='MyClass']' name='api-since' /> However, even though `generator` reads the `name` attribute, it then proceeds to ignore it and remove *all* attributes on the matched node, resulting in: <package name='my.package'> <class /> </package> This seems unintuitive, and I'm not sure how this could ever be successfully used in a binding project, since leaving an empty `<class/>`/etc. node causes `generator` to crash. Update `<remove-attr/>` to work as expected, removing the named attribute.
- Loading branch information