Closed erichlf closed 4 months ago
I believe the order matters, yes. Same for the order of <version>
/<description>
/<maintainer>
/<license>
/etc. See the schema: http://download.ros.org/schema/package_format3.xsd
Yep looks like it does matter.
@christophebedard: order matters because it seems the XSD uses a xs:sequence
for the package
element description.
But it's not clear to me why.
Consistency, probably?
I've looked through the history of the files, but can't really find any comments on this. Dirk appears to 'just' commit the .xsd
s, and that's that.
Yeah, and the REPs (149 for format 3 or 140 for format 2) don't seem to explicitly mention that the elements have a specific order either.
I know that it is generally accepted -- or, rather, known -- that <maintainer>
goes before <license>
, which goes before <author>
(otherwise the linter complains), but I've never seen any rationale for it.
I remembered the original discussion on ros-users
that was the start of the schemas: [ros-users] review: catkin documentation review for package.xml format 2, but there's also no mention of any explicit order there.
Perhaps the original author just used sequence
and it was never really discussed.
I know that it is generally accepted -- or, rather, known -- that
<maintainer>
goes before<license>
, which goes before<author>
(otherwise the linter complains), but I've never seen any rationale for it.
I do believe that's mostly just convention.
@erichlf
we have talked about this a bit in today's ROS 2 team meeting. this is more like a question not an issue, besides this is how this works atm, and currently no plan to change the behavior. so if that is okay, we can close this for now.
if we escalate this as an issue, feel free to open this to track.
When I run
xmllint
with mypackages.xml
having the following orderI get the following error
However, simply changing things to the following
causes this to go away. Is it intended that the order matters here?