olofk / ipyxact

Python-based IP-XACT parser
MIT License
121 stars 47 forks source link

<spirit:master/> and <spirit:slave/> info for BusInterfaces cannot be extracted in useful way #27

Open tpoikela opened 3 years ago

tpoikela commented 3 years ago

Since master/slave is defined as an empty tag like this (see also http://www.accellera.org/XMLSchema/SPIRIT/1685-2009/busInterface.xsd) :

<spirit:busInterface>
  <spirit:slave/>
  <!-- OR -->
  <spirit:master/>
  ...
<spirit:busInterface/>

in the current implementation of ipyxact they are always empty strings, regardless of their presence or absence in the IP-XACT file. Thus, it is not possible to extract master/slave information from the parsed structure.

I don't know if ipyxact can currently handle a case like this, but one option would be to set the property as True if it's defined, and False otherwise. However, I don't think this fits into your current scheme of defining the grammar/types using yaml.

olofk commented 8 months ago

Hmm... that's pretty bad. Need to check if it's the same situation with the new API