Live data from Hacker News

Microsoft Office is using an artificially complex XML schema as a lock-in tool

blog.documentfoundation.org

91–100 of 131 posts

Re: Microsoft Office is using an artificially complex XML schema as a lock-in tool

#91

I wish this article had shown side-by-side examples. Back when I built document transformation tools as part of a publishing pipeline, the simplicity and clarity benefit of OpenDocument's XML over Microsoft's OOXML were *staggering* in practice. A beautiful, clean, logical approach vs beyond-Byzantine cruft and complexity at every turn. I don't remember every element enough to render from memory, but ChatGPT's exampl…

honestly OOXML looks a loot like someone took a non XML format and gave it a XML encoding

like XML is a mark up language so it _should_ interleave quite "naturally" and well for text formatting tasks (i.e. see OpenDocument example or supper simple "ancient style" HTML)

but OOXML looks more like someone force serialized some live OOP object hierarchy with (potential cyclic) references and tone of subclasses etc.

tl;dr: i.e. it looks a loot similar to a simplified form of how text editors internal represent formatted test

like w:r looks like a text section, you could say a r_ow of wide characters or words, w:p looks like a subclass of a implicit type which is basically a `Vec`, w:pPr looks like ".presentation" property of w:p, same for w:rPr, probably both being subtypes of some generic Presentation base class. w:t looks like a generic `.text: String` property. w:pStyle looks like a property of Presentation or it's ParagraphPresentation sub-class, it's `w:val` property makes it look like it's a shared reference which can be looked up by the key `"Para"`. w:b is just another subclass of Presentation you can use in any context etc.

which opens the question

"do they mostly just dump their internal app state"?

and did they make their format that over-complicated and "over" flexible so that they can just change their internal structure and still dump it?

which would also explain how they might have ended up with "accidentally" incorrectly implementing their own standard around 10 years ago during early OOXML times

and if so isn't that basically "proof" that OOXML isn't really an open format but just a "make pretend" of one?

Re: Microsoft Office is using an artificially complex XML schema as a lock-in tool

#92

What we should really do is abandon the WYSIWYG approach to document editing. This inevitably leads into vendor lock in. Instead of perfect looks, we should focus on the content. Formats like markdown are nice, because they force you to do this. The old way made sense 30 yers ago when information was consumed on paper.

even many of the very widely used LaTex "editors" do have some semi live "preview" feature which often allow some WYSIWYG like features in the preview

similar if someone random non technical person just needs to write idk. 5 paragraphs of text with a head line, no high requirements for formatting, no kind of templates, no anything fancy why would you force them to not have WYSIWYG if that is the perfekt fit for their use case in every single aspect?

Similar markdown doesn't scale to a lot of writing requirements, like _AT ALL_. I know because I have written pretty much any thesis or larger reports etc. during my studies in markdown. And I had to step out of markdown all the time. Weather that is by using inline latex, or by tweaking markdown to PDF conversion templates (by interleaving non mark down sources with markdown by splitting the markdown into many different files and folders which each could be markdown or anything else, and/or inline latex to include non markdown sources imported into latex) etc. It was a nice pipeline, but it also wasn't really markdown anymore, but instead some amalgamation of markdown LaTex and other things. As a programmer that was fine, but that doesn't scale at all to the "standard" user of office applications.

Re: Microsoft Office is using an artificially complex XML schema as a lock-in tool

#93
post #45

What we should really do is abandon the WYSIWYG approach to document editing. This inevitably leads into vendor lock in. Instead of perfect looks, we should focus on the content. Formats like markdown are nice, because they force you to do this. The old way made sense 30 yers ago when information was consumed on paper.

Looking at Latex, I don't think hand tuning some parameters until you get right look in every single case is much better user experience... Ofc, if we stop really caring what things look like we could save lot of energy and time. Just go back to pure HTML without any JavaScript or CSS...

> Looking at Latex, I don't think hand tuning some parameters until you get right look in every single case is much better user experience...

In my experience you do that more in Word then in Latex (the I added some paragraphs here and wtf is that picture two pages later doing now problem).

The issue is to some degree quite fundamental to the underlying challenges of laying out formatted text with embedded things, affecting both word and LaTex.

through that is assuming you now how to properly use Word / LaTex if you don't you can cause yourself a huge amount of work ;)

Re: Microsoft Office is using an artificially complex XML schema as a lock-in tool

#94

What we should really do is abandon the WYSIWYG approach to document editing. This inevitably leads into vendor lock in. Instead of perfect looks, we should focus on the content. Formats like markdown are nice, because they force you to do this. The old way made sense 30 yers ago when information was consumed on paper.

> Instead of perfect looks, we should focus on the content.

Many documents are created for looks rather than content.

Re: Microsoft Office is using an artificially complex XML schema as a lock-in tool

#95
Mind you, Microsoft already had an earlier very capable XML spreadsheet format that was much easier to parse, SpreadsheetML.

Back in the early 2000's I wrote readers and writers for it and made pretty heavy use of the format at my job at the time.

The biggest problem with SpreadsheetML was that it expected the extension to be .XML - Microsoft had some sort of magic that would still associate the files with Excel on Windows but it wasn't super reliable. We started using .xls but after an update Excel started barking about files with the wrong extension.

https://en.wikipedia.org/wiki/SpreadsheetML

Re: Microsoft Office is using an artificially complex XML schema as a lock-in tool

#96
post #95

Mind you, Microsoft already had an earlier very capable XML spreadsheet format that was much easier to parse, SpreadsheetML. Back in the early 2000's I wrote readers and writers for it and made pretty heavy use of the format at my job at the time. The biggest problem with SpreadsheetML was that it expected the extension to be .XML - Microsoft had some sort of magic that would still associate the files with Excel on W…

They had a few more variants in the same era, such as WordProcessingML for Word: https://en.wikipedia.org/wiki/Microsoft_Office_XML_formats

Re: Microsoft Office is using an artificially complex XML schema as a lock-in tool

#97

I don't even think it's intentional, they had to come up with a file format which supports all the weird historical artefacts in the various Office tools. They didn't have the luxury to first come up with a clean file format and then write the tools around it. And I bet they didn't switch to XML because it was superior to their old file formats, but simply because of the unbelievable XML hype that existed for a short…

> They didn't have the luxury to first come up with a clean file format and then write the tools around it.

This is just not right.

They where not required (AFIK) and in some edge cases also didn't provide a perfect conversion of all old documents to the open format. Actually even just converting between different versions of their proprietary formats had a tendency to break things sometimes! (back then)

> unbelievable XML hype that existed for a short time in the late 1990s and early 2000s.

(EDIT: actually 2006, so uh, maybe XML hype) we speak about ~2010, the hype was pretty dead again at that time, and the main reason they choose it is to position it as "completion" to emerging standardized open office document formats which all used XML as markup language (except they don't really use XML as mark down language but more like serialization to JSON but way more complex, but that doesn't matter they mostly need to convince not supper tech affine people about them "no longer trying to hamper competition" to preclude legislative action and governments from switching to other office suites due to the closed format making them worry).

so they where more then able to

- do a clean design, if anyway a lot of old "proprietary" documents break subtly when converting it doesn't matter (and they did break)

- just adopt OpenDocument format

Re: Microsoft Office is using an artificially complex XML schema as a lock-in tool

#98

I wish this article had shown side-by-side examples. Back when I built document transformation tools as part of a publishing pipeline, the simplicity and clarity benefit of OpenDocument's XML over Microsoft's OOXML were *staggering* in practice. A beautiful, clean, logical approach vs beyond-Byzantine cruft and complexity at every turn. I don't remember every element enough to render from memory, but ChatGPT's exampl…

honestly OOXML looks a loot like someone took a non XML format and gave it a XML encoding like XML is a mark up language so it _should_ interleave quite "naturally" and well for text formatting tasks (i.e. see OpenDocument example or supper simple "ancient style" HTML) but OOXML looks more like someone force serialized some live OOP object hierarchy with (potential cyclic) references and tone of subclasses etc. tl;dr…

I read somewhere that in the first versions of Office, the "documents" were literally just memory dumps.

So I guess they're going back to that old strategy...

Edit: Source might have been this: https://news.ycombinator.com/item?id=39402595 , so part of it might have been an urban myth.

Re: Microsoft Office is using an artificially complex XML schema as a lock-in tool

#99

I don't even think it's intentional, they had to come up with a file format which supports all the weird historical artefacts in the various Office tools. They didn't have the luxury to first come up with a clean file format and then write the tools around it. And I bet they didn't switch to XML because it was superior to their old file formats, but simply because of the unbelievable XML hype that existed for a short…

An XML format, even one with a lot of cruft to handle legacy complexity, is absolutely easier to parse/interop with than a legacy binary format that was to a large degree a serialization of undocumented in-memory content. OOXML was, if anything, an attempt to get ahead of requirements to have a documented interoperable format. I believe it was a consequence of legal settlements with the US or EU but am too tired at t…

> is absolutely easier to parse/interop with than a legacy binary format

depends

you can have well, clean and fully documented binary formats which are relatively easy to parse (e.g. msgpack, cbor, bson)

you might still not know what the parsed things mean, but that also applies to text formats (including random documented binary blob fields, thanks to base64 they also fit into any text format)

Re: Microsoft Office is using an artificially complex XML schema as a lock-in tool

#100
post #21
post #6

Earlier quoted context omitted.

Weren't those reasons effectively...? 'special case everything we ever used to do in office so everything renders exactly the same' Instead of offering some suitable placebo for properly rendering into a new format ONCE with those specific quirks fixed in place?

What would that look like? "You have opened your Word 97 document in Office 2003. The quirks have been removed, so it might look different now. Check every page before saving as docx." "You have pasted from a Word 97 document into an Office 2003 OOXML document. Some things will not work."

If you want a look at how this (doesn't) work in practice, just look at Libreoffice. I once made 3 hours worth of comments on a Word doc, and as soon as I saved it, they all vanished into thin air.

And for the pedantic, yes it warns you when saving as a .docx that "not all features are supported", but it does that every time, for every document, so nobody pays attention to it or has any idea what it even means. To me the way it handles this is just completely unacceptable.

Post reply on HN