Ask Your Question
3

Roslaunch XML format: is there a DTD?

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

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 imagedornhege ( 2013-04-16 05:08:24 -0600 )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 imagesergey_alexandrov ( 2013-04-16 05:27:22 -0600 )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 imagemikepurvis ( 2013-10-17 06:21:54 -0600 )edit

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

sergey_alexandrov gravatar imagesergey_alexandrov ( 2013-10-17 06:37:04 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
3

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

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
1

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

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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

3 followers

Stats

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

Seen: 259 times

Last updated: Jan 05 '18