ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
4

Roslaunch XML format: is there a DTD?

asked 2013-04-16 04:56:31 -0500

sergey_alexandrov gravatar image

Hi,

I am developing a ROS plugin for Vim and want to add support for editing of roslaunch files. Vim already has a built-in support for omni-completion of XML dialects as soon as the formal definition of a language is provided. So I am wondering does there exist a DTD for the roslaunch XML format?

edit retag flag offensive close merge delete

Comments

I don't know if there is, but you could make one yourself. Would be nice, if you finish this. My complete vim plugin is currently setfiletype xml.

dornhege gravatar image dornhege  ( 2013-04-16 05:08:24 -0500 )edit

Ha-ha yes, ft=xml is suprisingly useful :) For sure I can create DTD myself, but I just hoped to avoid extra work and also simplify maintenance.

sergey_alexandrov gravatar image sergey_alexandrov  ( 2013-04-16 05:27:22 -0500 )edit

@sergey_alexandrov, if you end up doing this, it would be very useful to use as a basis for linting roslaunch files in roslint.

mikepurvis gravatar image mikepurvis  ( 2013-10-17 06:21:54 -0500 )edit

@mikepurvis No, in the end I decided it is not worth the effort, sorry...

sergey_alexandrov gravatar image sergey_alexandrov  ( 2013-10-17 06:37:04 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
3

answered 2013-09-29 21:28:10 -0500

Thomas gravatar image

AFAIK there isn't.

One reason is that ROS uses TinyXML for parsing XML files which does not support DTD:

TinyXML doesn't parse or use DTDs (Document Type Definitions) or XSLs (eXtensible Stylesheet Language.)

...so ROS tools cannot validate your launch file as they are implemented now. This aside, this would be definitively a very nice contribution.

edit flag offensive delete link more
2

answered 2018-01-05 12:14:46 -0500

Nicolas gravatar image

I created an XSD and a DTD. It's on https://gist.github.com/nalt/dfa2abc9... for now. Feel free to comment.

It looks like the XSD is the better choice.

It works for code completion, highlighting and validation with various tools.

edit flag offensive delete link more

Comments

sory i am new to this i can't install the plugin of sergey, but i want to autocomplete my .launch where do i put your files to my vim autocomplete my launch file

jrj.fonseca gravatar image jrj.fonseca  ( 2020-04-16 14:21:41 -0500 )edit

Question Tools

4 followers

Stats

Asked: 2013-04-16 04:56:31 -0500

Seen: 583 times

Last updated: Jan 05 '18