Olof, I saw in another email from you that you solved your namespace issue with the --no-namespace-defs command line option.
Great. Concerning the problem you describe below related to the differences between classes logicalPort and partSelect -- Thank you for providing that sample code and the XML schemas (in the github repo). I was able to generate a module using your shell script. And, yes I do not understand why the logicalPort class is building a unsignedPositiveLongintExpression object while the partSelect is building a range_ object. Possibly because "range" is a Python keyword? Or, maybe because one range is defined inside an xs:sequence and the other is inside an xs:choice. I'll look at this problem again tomorrow. But, if you've already solved this or have ideas on it, let me know. More later. Dave On Wed, Mar 07, 2018 at 12:09:48PM +0100, Olof Kindgren wrote: > Not sure how to best describe the problem, but I found an issue where it > seems like I get the subelement of a node instead of the node itself. > > The following input XML > <ipxact:portMap> > <ipxact:logicalPort> > <ipxact:name>adr_o</ipxact:name> > <ipxact:range> > <ipxact:left>2</ipxact:left> > <ipxact:right>0</ipxact:right> > </ipxact:range> > </ipxact:logicalPort> > <ipxact:physicalPort> > <ipxact:name>wb_adr_i</ipxact:name> > <ipxact:partSelect> > <ipxact:range> > <ipxact:left>2</ipxact:left> > <ipxact:right>0</ipxact:right> > </ipxact:range> > </ipxact:partSelect> > </ipxact:physicalPort> > </ipxact:portMap> > > will generate > > <ipxact:portMap xmlns:ipxact=" > http://www.accellera.org/XMLSchema/IPXACT/1685-2014"> > <ipxact:logicalPort xmlns:ipxact=" > http://www.accellera.org/XMLSchema/IPXACT/1685-2014"> > <ipxact:name>adr_o</ipxact:name> > <ipxact:range> > > > </ipxact:range> > </ipxact:logicalPort> > <ipxact:physicalPort xmlns:ipxact=" > http://www.accellera.org/XMLSchema/IPXACT/1685-2014"> > <ipxact:name>wb_adr_i</ipxact:name> > <ipxact:partSelect xmlns:ipxact=" > http://www.accellera.org/XMLSchema/IPXACT/1685-2014"> > <ipxact:range xmlns:ipxact=" > http://www.accellera.org/XMLSchema/IPXACT/1685-2014"> > <ipxact:left>2</ipxact:left> > <ipxact:right>0</ipxact:right> > </ipxact:range> > </ipxact:partSelect> > </ipxact:physicalPort> > </ipxact:portMap> > > when it is exported. > > Looking through the python object tree I see that the range object is > determined to be a ipxact.unsignedPositiveLongintExpression in the case > where it is missing in the output file, while it is a ipxact.rangeType in > the case where it works. I see that there are also differences in the > Python code generated by generateDS between the partSelect and logicalPort > classes > > I have prepared a test case here > https://github.com/olofk/ipxact_gen/tree/gendsbugs > > regen.sh will run generateDS > test_range.sh will print out the differences in types as mentioned above > > Finding this painfully hard to describe, so please let me know if I can add > any more information > > Cheers, > Olof > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > generateds-users mailing list > generateds-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/generateds-users -- Dave Kuhlman http://www.davekuhlman.org ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ generateds-users mailing list generateds-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/generateds-users