fkie/iop_wireshark_plugin

Parser fails if the default xmlns is not "urn:jaus:jsidl:1.0"

kjeremy opened this issue · 1 comments

It is valid JSIDL to have the following as an example:

 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<service_def name="AccessControl" id="urn:jaus:jss:core:AccessControl" version="1.1" xmlns="urn:jaus:jsidl:1.1" xmlns:ns2="urn:jaus:jsidl:plus">

This tool fails to parse this. A workaround is to patch JSIDL like so:

 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<service_def name="AccessControl" id="urn:jaus:jss:core:AccessControl" version="1.1" xmlns="urn:jaus:jsidl:1.1" xmlns:ns2="urn:jaus:jsidl:plus">
+<service_def name="AccessControl" id="urn:jaus:jss:core:AccessControl" version="1.1" xmlns="urn:jaus:jsidl:1.0" xmlns:ns2="urn:jaus:jsidl:1.1" xmlns:ns3="urn:jaus:jsidl:plus">
     <description xml:space="preserve">The Access Control service offers a basic interface for acquiring preemptable exclusive control to one or more related services that utilize this function. Once the exclusive control is established, the related services shall only execute commands originating from the controlling component. The authority code parameter of this service is used for preemption and is to be set equal to that of its controlling client. This service always grants control to the highest authority client that is requesting exclusive control. Commands from all other clients are ignored unless from a client with higher authority. This service maintains two values, a default value and a current value of a field called authority code. The default value is the value that the service is pre-configured with. Access is provided to clients based on the value of their authority code in comparison to the current value of this service.</description>
     <assumptions xml:space="preserve">Messages may be delayed, lost or reordered.</assumptions>
     <references>
         <inherits_from name="events" id="urn:jaus:jss:core:Events" version="1.1"/>
     </references>
@@ -203,11 +203,11 @@
                             <action name="init"/>
                         </entry>
                         <transition name="events.transport.Receive">
                             <parameter type="ReleaseControl" value="msg" interpretation="enveloped release control message"/>
                             <parameter type="Receive.Body.ReceiveRec" value="transportData" interpretation="transport data"/>
-                            <internal/>
+                            <ns2:internal/>

The usage of xmlns="urn:jaus:jsidl:1.1" in JSIDL should be fixed now.

Please reopen if not!