Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix invalid launch XSD #278

Merged
merged 4 commits into from
Apr 16, 2020
Merged

Fix invalid launch XSD #278

merged 4 commits into from
Apr 16, 2020

Conversation

hidmic
Copy link
Contributor

@hidmic hidmic commented Apr 16, 2020

Precisely what the title says. Addresses ros2/launch#396.

Signed-off-by: Michel Hidalgo <[email protected]>
Signed-off-by: Michel Hidalgo <[email protected]>
Copy link
Member

@ivanpauno ivanpauno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Unfortunately we aren't using this schema to validate anything, so it's hard to tell if it's correct or not.

articles/specs/launch.0.1.1.xsd Show resolved Hide resolved
articles/specs/launch.0.1.1.xsd Outdated Show resolved Hide resolved
Copy link
Contributor

@clalancette clalancette left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A bunch of mostly questions.

<xs:element name="arg">
<xs:annotation>
<xs:documentation xml:lang="en">
Declares launch file-level arguments.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this was already there, but could you explain a little more what is meant by file-level arguments? It's not clear to me.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Declares a launch file argument.

conveys the same amount of information more clearly. Changed in 25db021.

@@ -475,7 477,7 @@
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:assert test="(@name and not(@from)) or (not(@name) and @from)"/>
<!-- <xs:assert test="(@name and not(@from)) or (not(@name) and @from)"/> -->
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we commenting this out?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't be. See #278 (comment).

@@ -524,8 526,7 @@
<xs:element ref="param"/>
<xs:element ref="remap"/>
</xs:choice>
</xs:complexType>
<xs:attribute name="package" type="xs:string" use="required">
<xs:attribute name="package" type="xs:string" use="required">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The indentation seems odd here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is. Fixed in 25db021.

@@ -608,5 609,6 @@
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not really clear to me that this is the right thing to do here. I think the "complexType" here is indeed the ref to "env", "param", and "remap", and it should end there. The rest of the attributes seem to be attributes on "node", so I think this should be moved back where it was, and the indentation should be fixed. Or maybe I'm misunderstanding?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as in #278 (comment).

@@ -172,6 151,29 @@
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="file" type="xs:string" use="required">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of curiosity, does moving this around have any affect on what is allowed by the schema?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Attributes apply to the type of the element, not the element itself (see https://www.w3schools.com/xml/el_attribute.asp). It was invalid XSD.

Signed-off-by: Michel Hidalgo <[email protected]>
@hidmic
Copy link
Contributor Author

hidmic commented Apr 16, 2020

@clalancette PTAL !

@ivanpauno
Copy link
Member

@hidmic I'm not sure why, but checks aren't passing.

Signed-off-by: Michel Hidalgo <[email protected]>
@hidmic
Copy link
Contributor Author

hidmic commented Apr 16, 2020

@hidmic I'm not sure why, but checks aren't passing.

Did not update all places.

@hidmic
Copy link
Contributor Author

hidmic commented Apr 16, 2020

Alright, going in!

@hidmic hidmic merged commit 53526e2 into gh-pages Apr 16, 2020
@delete-merged-branch delete-merged-branch bot deleted the hidmic/fix-launch-xsd branch April 16, 2020 21:15
mlanting pushed a commit to mlanting/design that referenced this pull request Aug 17, 2020
mlanting pushed a commit to mlanting/design that referenced this pull request Aug 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants