Jump to content

Duplicated schema tags


Recommended Posts


I've been looking at creating a Python library to work with IP-XACT. My current attempt (https://github.com/olofk/ipyxact) implements a small subset of IP-XACT, but it would be too much work to do this for the complete standard, so instead I've been looking at using generateDS to help me with the process of creating classes. The problem that appears now is that there are some tags in the schema files with identical names that are defined in several places. An example of this is the viewRef type. It is defined in 7 different places. Some of these are identical, which leaves us with 3 unique definitions. These three unique versions are similar enough so that the python classes are actually identical for all 7 definitions. My question is therefore, should there really only be one definition of viewRef, that all the other can refer to? The same thing would apply to other tags as well, such as accessHandles, registerType, portType etc, or am I missing something? I haven't dealt with xsd files before, so my knowledge of the subject is limited

Link to comment
Share on other sites


In case of viewRef, it may be that the different definitions can be factored out into a single definition. I agree with you that it would have been cleaner to have a single definition rather than duplicating the same definition multiple times. However, for accessHandles and ports there are really different definitions. A port in an abstractionDefinition is different from a port in a component. Hence, your translation to Python classes should include some use of scopes or namespaces.

Best regards,

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...