Skip to content

Commit

Permalink
Fix invalid launch XSD (ros2#278)
Browse files Browse the repository at this point in the history
Signed-off-by: Michel Hidalgo <[email protected]>
  • Loading branch information
hidmic authored and mlanting committed Aug 17, 2020
1 parent 7c22a53 commit 7ad7649
Show file tree
Hide file tree
Showing 2 changed files with 111 additions and 110 deletions.
2 changes: 1 addition & 1 deletion articles/151_roslaunch_xml.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ YAML is currently supported too, and other markup languages could be added.
### Schema Definition

```xml
{% include_relative specs/launch.0.1.0.xsd %}
{% include_relative specs/launch.0.1.1.xsd %}
```

### Tags Semantics
Expand Down
219 changes: 110 additions & 109 deletions articles/specs/launch.0.1.0.xsd → articles/specs/launch.0.1.1.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -8,80 +8,82 @@
</xs:documentation>
</xs:annotation>

<xs:element name="launch" maxOccurs="1">
<xs:element name="launch">
<xs:annotation>
<xs:documentation xml:lang="en">
The root element of a launch file.
</xs:documentation>
</xs:annotation>

<xs:choice minOccurs="1" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation xml:lang="en">
A collection of actions to be launched in order of appearance, plus
launch arguments for callers to provide, either through a tool or
by inclusion.
</xs:documentation>
</xs:annotation>

<xs:element name="arg">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:annotation>
<xs:documentation xml:lang="en">
Declares launch file-level arguments.
A collection of actions to be launched in order of appearance, plus
launch arguments for callers to provide, either through a tool or
by inclusion.
</xs:documentation>
</xs:annotation>

<xs:complexType>
<xs:attribute name="name" type="xs:string" use="required">
<xs:annotation>
<xs:documentation xml:lang="en">
Name of the launch argument.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="value" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation xml:lang="en">
Fixed value for the launch argument, disables overrides.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="default" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation xml:lang="en">
Default value for the launch argument, used if non is provided.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="description" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation xml:lang="en">
Brief description of the launch argument.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element ref="let"/>
<xs:element ref="node"/>
<xs:element ref="executable"/>
<xs:element ref="include"/>
<xs:element ref="group"/>
<xs:element ref="set_env"/>
<xs:element ref="unset_env"/>
</xs:choice>
<xs:attribute name="version" use="required">
<xs:annotation>
<xs:documentation xml:lang="en">
Launch XML schema version in use.
</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="[0-9]+\.[0-9]+\.[0-9]+"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:element name="arg">
<xs:annotation>
<xs:documentation xml:lang="en">
Declares a launch file argument.
</xs:documentation>
</xs:annotation>

<xs:complexType>
<xs:attribute name="name" type="xs:string" use="required">
<xs:annotation>
<xs:documentation xml:lang="en">
Name of the launch argument.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="value" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation xml:lang="en">
Fixed value for the launch argument, disables overrides.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="default" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation xml:lang="en">
Default value for the launch argument, used if non is provided.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="description" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation xml:lang="en">
Brief description of the launch argument.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element ref="let"/>
<xs:element ref="node"/>
<xs:element ref="executable"/>
<xs:element ref="include"/>
<xs:element ref="group"/>
<xs:element ref="set_env"/>
<xs:element ref="unset_env"/>
</xs:choice>
<xs:attribute name="version" use="required">
<xs:annotation>
<xs:documentation xml:lang="en">
Launch XML schema version in use.
</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="[0-9]+\.[0-9]+\.[0-9]+"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>

<xs:element name="let">
Expand Down Expand Up @@ -117,29 +119,6 @@
</xs:annotation>

<xs:complexType>
<xs:attribute name="file" type="xs:string" use="required">
<xs:annotation>
<xs:documentation xml:lang="en">
Path to the launch file to be included.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="if" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation xml:lang="en">
A predicate to condition launch inclusion i.e. only do
so if the predicate evaluates to a truthy value.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="unless" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation xml:lang="en">
A predicate to condition launch inclusion i.e. do
so unless the predicate evaluates to a truthy value.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation xml:lang="en">
Expand Down Expand Up @@ -172,6 +151,29 @@
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="file" type="xs:string" use="required">
<xs:annotation>
<xs:documentation xml:lang="en">
Path to the launch file to be included.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="if" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation xml:lang="en">
A predicate to condition launch inclusion i.e. only do
so if the predicate evaluates to a truthy value.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="unless" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation xml:lang="en">
A predicate to condition launch inclusion i.e. do
so unless the predicate evaluates to a truthy value.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>

Expand Down Expand Up @@ -519,33 +521,31 @@
environment variable settings for the launched ROS node.
</xs:documentation>
</xs:annotation>

<xs:element ref="env"/>
<xs:element ref="param"/>
<xs:element ref="remap"/>
</xs:choice>
</xs:complexType>
<xs:attribute name="package" type="xs:string" use="required">
<xs:annotation>
<xs:documentation xml:lang="en">
Name of the package where the node is to be found.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="executable" type="xs:string" use="required">
<xs:annotation>
<xs:documentation xml:lang="en">
Name of the node executable.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="name" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation xml:lang="en">
A name for the launched ROS node.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="package" type="xs:string" use="required">
<xs:annotation>
<xs:documentation xml:lang="en">
Name of the package where the node is to be found.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="executable" type="xs:string" use="required">
<xs:annotation>
<xs:documentation xml:lang="en">
Name of the node executable.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="name" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation xml:lang="en">
A name for the launched ROS node.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="args" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation xml:lang="en">
Expand Down Expand Up @@ -608,5 +608,6 @@
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>

0 comments on commit 7ad7649

Please sign in to comment.