Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kactus doesn't correctly deal with XML namespaces #31

Open
andreasWallner opened this issue Aug 31, 2019 · 3 comments
Open

Kactus doesn't correctly deal with XML namespaces #31

andreasWallner opened this issue Aug 31, 2019 · 3 comments

Comments

@andreasWallner
Copy link

I'm trying to use Kactus with a bunch of scripts/tools that we've used for a while. I encountered a problem while doing that with the XML namespace handling in Kacuts. Our tools use an XML libraries that do not explicitly place the namespace on every node (and can't be forced to do so) but use the 'xmlns' attribute to set the namespace on the root node of the file. Those files can't be worked on using Kactus because the deserialization assumes the namespace prefix 'ipxact:' to be present on all tags.
I'd be willing to provide a pull request to make the deserialization standards conformant, but wanted to ask first if such a change would be welcomed at all.

@epekkar
Copy link
Collaborator

epekkar commented Sep 3, 2019

Hi Andreas,
Your suggested contribution would be warmly welcome. I think two questions need to be considered:

  1. Is your need only for reading XML into Kactus2 or do you require the XML files created by Kactus2 to follow the same rule? The former I see as straightforward (yet requires effort) to implement, but the latter could be problematic.

  2. Do you need to consider vendor extensions (in their respective namespaces) as well?

@andreasWallner
Copy link
Author

Hi,
ad 1) Import alone should be sufficient. The files that you are currently generating are valid and correct XMLs as far as I've seen. Our tools should therefore understand them w/o problems. Something for me internally is to find a solution that we do not bounce between serializations in our version control, but that's a different topic.

ad 2) I need the import to at least preserve the namespace of vendor extensions - such that a saved file will represent the same data as on import.

Regarding vendor extensions: as far as I've seen you currently do not show them in the UI, is that correct?

I'll start with the modifications somewhen close to the WE, but I guess it will take me a bit as I'm doing that on the side.

@epekkar
Copy link
Collaborator

epekkar commented Sep 3, 2019

We recently introduced a prototype editor for vendor extensions, so at least you can check, if they import as expected. The editor can currenlty only show/edit component (top-level) and port extensions. You can enable it on the toolbar View->Visible Windows->Vendor Extensions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants