Re: [MAVLINK] generator issues

168 views
Skip to first unread message
Message has been deleted

susu...@gmail.com

unread,
Mar 1, 2013, 1:58:45 PM3/1/13
to mav...@googlegroups.com
It looks like you don't have any custom messages in your huch.xml, is that correct? If that's the case, then it looks like the new xml validator is incorrect as it doesn't properly handle files that only include other xml files.

In the mean time, does it work if you put an empty <messages> tag in your xml file?

Bryant


On Mar 1, 2013 6:59 AM, x75 <o...@xdv.org> wrote:

Dear list,

in our project we've been using multiple includes within the message_definitions such as

<mavlink>
     <include>common.xml</include>
     <include>ardupilotmega.xml</include>

after pulling in upstream recently, this doesn't work anymore, see error message below. before i investigate, is this intended behaviour? of course, messages is not missing mavlink huch.xml.

$ ./pymavlink/generator/mavgen.py -o ~/tmp/mavlink --lang=C --wire-protocol=1.0 message_definitions/v1.0/huch.xml
Validating message_definitions/v1.0/huch.xml
Traceback (most recent call last):
  File "./pymavlink/generator/mavgen.py", line 114, in <module>
    mavgen(opts, args)
  File "./pymavlink/generator/mavgen.py", line 39, in mavgen
    mavgen_validate(fname, schemaFile, opts.error_limit);
  File "./pymavlink/generator/mavgen.py", line 96, in mavgen_validate
    domTreeWrapper = pyxsval.parseAndValidate(fname, xsdFile=schema, errorLimit=errorLimitNumber)
  File "/home/src/QK/mavlink/pymavlink/generator/lib/minixsv/pyxsval.py", line 105, in parseAndValidate
    return parseAndValidateXmlInput (inputFile, xsdFile, 1, **kw)
  File "/home/src/QK/mavlink/pymavlink/generator/lib/minixsv/pyxsval.py", line 133, in parseAndValidateXmlInput
    return xsValidator.validateXmlInput (inputFile, inputTreeWrapper, xsdFile, validateSchema)
  File "/home/src/QK/mavlink/pymavlink/generator/lib/minixsv/pyxsval.py", line 238, in validateXmlInput
    self._validateXmlInput (xmlInputFile, inputTreeWrapper, xsdTreeWrapperList)
  File "/home/src/QK/mavlink/pymavlink/generator/lib/minixsv/pyxsval.py", line 294, in _validateXmlInput
    self.errorHandler.flushOutput()
  File "/home/src/QK/mavlink/pymavlink/generator/lib/minixsv/xsvalErrorHandler.py", line 132, in flushOutput
    self._raiseXsvalException ()
  File "/home/src/QK/mavlink/pymavlink/generator/lib/minixsv/xsvalErrorHandler.py", line 141, in _raiseXsvalException
    raise XsvalError (output)
minixsv.xsvalErrorHandler.XsvalError: ERROR: huch.xml: line 4: Missing child tag u'messages' in tag u'mavlink'!
$

regards,
oswald

--
Sie haben diese Nachricht erhalten, weil Sie der Google Groups-Gruppe MAVLink beigetreten sind.
Um Ihr Abonnement für diese Gruppe zu beenden und keine E-Mails mehr von dieser Gruppe zu erhalten, senden Sie eine Email an mavlink+u...@googlegroups.com.
Weitere Optionen: https://groups.google.com/groups/opt_out
 
 

oswald berthold

unread,
Mar 4, 2013, 5:16:08 AM3/4/13
to mav...@googlegroups.com

susu...@gmail.com writes:

> It looks like you don't have any custom messages in your <span
> id="signature">huch.xml, is that correct? If that's the case, then it
> looks like the new xml validator is incorrect as it doesn't properly
> handle files that only include other xml files.In the mean time, does
> it work if you put an empty <messages> tag in your xml file?Bryant


Hi Bryant,

sorry, this might not have been clear: i do have a <messages> tag in
huch.xml which contains a bunch of custom messages.

i assume huch.xml is well-formed as it works fine if the second include
(ardupilotmega.xml) is removed.

it appears that the parser expects two and no more message tags, one
from common.xml via include and one from body of user.xml

i can live with that and am just wondering, what is the intended
behaviour. basically i think it would make sense to allow for multiple
includes.

bst, oswald

></span><span style="color:navy; font-family:Prelude, Verdana, san-serif; ">
> ----------------------------------------------------------------------On Mar 1, 2013 6:59 AM, x75 <o...@xdv.org> wrote: </span>Dear list,in our project we've been using multiple includes within the message_definitions such as<mavlink> <include>common.xml</include> <include>ardupilotmega.xml</include>after pulling in upstream recently, this doesn't work anymore, see error message below. before i investigate, is this intended behaviour? of course, messages is not missing mavlink huch.xml.$ ./pymavlink/generator/mavgen.py -o ~/tmp/mavlink --lang=C --wire-protocol=1.0 message_definitions/v1.0/huch.xmlValidating message_definitions/v1.0/huch.xmlTraceback (most recent call last): File "./pymavlink/generator/mavgen.py", line 114, in <module> mavgen(opts, args) File "./pymavlink/generator/mavgen.py", line 39, in mavgen mavgen_validate(fname, schemaFile, opts.error_limit); File "./pymavlink/generator/mavgen.py", line 96, in mavgen_validate domTreeWrapper = pyxsval.parseAndValidate(fname, xsdFile=schema, errorLimit=errorLimitNumber) File "/home/src/QK/mavlink/pymavlink/generator/lib/minixsv/pyxsval.py", line 105, in parseAndValidate return parseAndValidateXmlInput (inputFile, xsdFile, 1, **kw) File "/home/src/QK/mavlink/pymavlink/generator/lib/minixsv/pyxsval.py", line 133, in parseAndValidateXmlInput return xsValidator.validateXmlInput (inputFile, inputTreeWrapper, xsdFile, validateSchema) File "/home/src/QK/mavlink/pymavlink/generator/lib/minixsv/pyxsval.py", line 238, in validateXmlInput self._validateXmlInput (xmlInputFile, inputTreeWrapper, xsdTreeWrapperList) File "/home/src/QK/mavlink/pymavlink/generator/lib/minixsv/pyxsval.py", line 294, in _validateXmlInput self.errorHandler.flushOutput() File "/home/src/QK/mavlink/pymavlink/generator/lib/minixsv/xsvalErrorHandler.py", line 132, in flushOutput self._raiseXsvalException () File "/home/src/QK/mavlink/pymavlink/generator/lib/minixsv/xsvalErrorHandler.py", line 141, in _raiseXsvalException raise XsvalError (output)minixsv.xsvalErrorHandler.XsvalError: ERROR: huch.xml: line 4: Missing child tag u'messages' in tag u'mavlink'!$ regards,oswald

Bryant

unread,
Mar 8, 2013, 1:49:01 PM3/8/13
to mav...@googlegroups.com
So can you post a file that causes the validator to fail, either your
whole huch.xml or a minimal test case? That'd really be the easiest way
to see what's going on here. As for the spec itself, it's all contained
in the .xsd file. It looks like our .xsd should be modified to support
your use-case.

Bryant
Reply all
Reply to author
Forward
0 new messages