Book a Demo

Author Topic: Format XMI for version controlled packages  (Read 7137 times)

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Format XMI for version controlled packages
« on: January 27, 2021, 10:52:55 pm »
We have a bunch of version controlled packages.
Up until very recently the xmi that ended up in the version control system is formatted to be human readable.

Now the whole xml content is on a single line.
That made comparing two versions go from difficult to impossible.

I think the option Preferences | XML specifications | Format XMI output used to control that, but that setting is on for all of us and hasn't changed.

We are currently using 15.2.1557

Anyone have the same experience and/or a solution?

Geert

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Format XMI for version controlled packages
« Reply #1 on: January 27, 2021, 11:12:35 pm »
We have ended up with XMI files that are part formatted and other parts a single line as you describe.

Sorry, no solution.

Paolo

Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Sunshine

  • EA Practitioner
  • ***
  • Posts: 1353
  • Karma: +121/-10
  • Its the results that count
    • View Profile
Re: Format XMI for version controlled packages
« Reply #2 on: January 28, 2021, 01:39:03 pm »
We have a bunch of version controlled packages.
Up until very recently the xmi that ended up in the version control system is formatted to be human readable.

Now the whole xml content is on a single line.
That made comparing two versions go from difficult to impossible.

I think the option Preferences | XML specifications | Format XMI output used to control that, but that setting is on for all of us and hasn't changed.

We are currently using 15.2.1557

Anyone have the same experience and/or a solution?

Geert
Wasn't to do with Sparx EA but had a similar problem where wanted to compare XML file content rather than the file format. I found a tool that instead of doing a straight file compare like Diff it actually performed an XML comparison on the content. It didn't care about whether it was all on one line or multiple lines for each xml tag. Sorry can't remember exactly what it was now but it was something like XML Diff. It might have been a WinMerge feature/plug-in or Visual Studio Plug-in or XMLSpy as those were the tools I remember using at the time. It was a decade or so ago hence the foggy memory.
 
Happy to help
:)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Format XMI for version controlled packages
« Reply #3 on: January 28, 2021, 04:01:14 pm »
[SNIP]

Wasn't to do with Sparx EA but had a similar problem where wanted to compare XML file content rather than the file format. I found a tool that instead of doing a straight file compare like Diff it actually performed an XML comparison on the content. It didn't care about whether it was all on one line or multiple lines for each XML tag. Sorry can't remember exactly what it was now but it was something like XML Diff. It might have been a WinMerge feature/plug-in or Visual Studio Plug-in or XMLSpy as those were the tools I remember using at the time. It was a decade or so ago hence the foggy memory.
XMLSpy will do it.  It will also reformat for you, I think - but then most editors that have XML capability will.  As Geert Says, it's just a pain to have to go through this "dance".

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Format XMI for version controlled packages
« Reply #4 on: January 28, 2021, 04:42:12 pm »
I think the option Preferences | XML specifications | Format XMI output used to control that, but that setting is on for all of us and hasn't changed.

I'm going from memory here, but that was the problem. Every user could have a different value for that option, which showed up as a difference in the files they generated. Changing it in either direction is always going to upset someone, but because EA has always treated (and encouraged you/version control to treat) those files as a binary it would have seemed logical to not spend the time formatting the file.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Format XMI for version controlled packages
« Reply #5 on: January 28, 2021, 04:52:23 pm »
I think the option Preferences | XML specifications | Format XMI output used to control that, but that setting is on for all of us and hasn't changed.

I'm going from memory here, but that was the problem. Every user could have a different value for that option, which showed up as a difference in the files they generated. Changing it in either direction is always going to upset someone, but because EA has always treated (and encouraged you/version control to treat) those files as a binary it would have seemed logical to not spend the time formatting the file.
So instead of find a real solution to the problem (how can we get all users to use the same setting) you just decided that users aren't smart enough to use the option and took it away completely?
Eve, the EA users aren't toddlers, you (not you specifically, Sparx in general) don't have to treat us that way.

It was a perfectly valid option. If you wanted to be able to compare xmi files, you needed to offer up a bit of performance.
Now you made that choice for me, without even asking my opinion.

Geert

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Format XMI for version controlled packages
« Reply #6 on: January 28, 2021, 07:11:34 pm »
[SNIP]

So instead of finding a real solution to the problem (how can we get all users to use the same setting) you just decided that users aren't smart enough to use the option and took it away completely?
Eve, the EA users aren't toddlers, you (not you specifically, Sparx in general) don't have to treat us that way.

It was a perfectly valid option. If you wanted to be able to compare XMI files, you needed to offer up a bit of performance.
Now you made that choice for me, without even asking my opinion.

Geert
(my emphasis)
Shock! Horror!   :o

Sparxians wouldn't do that!   Oh, wait...  ::)

("Gotta 'ave a laff, sometimes" - it's almost Friday here)

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Sunshine

  • EA Practitioner
  • ***
  • Posts: 1353
  • Karma: +121/-10
  • Its the results that count
    • View Profile
Re: Format XMI for version controlled packages
« Reply #7 on: January 29, 2021, 03:01:16 am »
LOL its friday here in NZ  :)
If you don't laugh you'll end up crying and when you cry you cry alone.

You could use some xml formatter or pipe it through XSLT too.

Thinking about it further there a built‐in compare function embedded into Sparx EA to compare versions of packages that I've used in the past. I wonder if there is someway to leverage that.

Sparx, Personally I'd not have gone with the treating XML as binary in version control as its a bit like a broken pencil.
POINTLESS
« Last Edit: January 29, 2021, 03:37:04 am by Sunshine »
Happy to help
:)