-
Notifications
You must be signed in to change notification settings - Fork 193
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
Conversation
Signed-off-by: Michel Hidalgo <[email protected]>
Signed-off-by: Michel Hidalgo <[email protected]>
There was a problem hiding this 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.
There was a problem hiding this 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.
articles/specs/launch.0.1.1.xsd
Outdated
<xs:element name="arg"> | ||
<xs:annotation> | ||
<xs:documentation xml:lang="en"> | ||
Declares launch file-level arguments. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
articles/specs/launch.0.1.1.xsd
Outdated
@@ -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)"/> --> |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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).
articles/specs/launch.0.1.1.xsd
Outdated
@@ -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"> |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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"> |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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]>
@clalancette PTAL ! |
@hidmic I'm not sure why, but checks aren't passing. |
Signed-off-by: Michel Hidalgo <[email protected]>
Did not update all places. |
Alright, going in! |
Signed-off-by: Michel Hidalgo <[email protected]>
Signed-off-by: Michel Hidalgo <[email protected]>
Precisely what the title says. Addresses ros2/launch#396.