Re: Things that make me scream: xml:space="preserve" in WordML

From the few samples that I have lying around it seems that word2007 still puts everything on one line (in the zipped file) but does now move the xml:space attributes just on to the text run elements, not on the document element. It’s not that surprising that MS generated XML puts xml:space everywhere even in places where a reading of the XML spec would suggest that it isn’t needed, as their XML parsers have a well known “feature” that they strip white space by default, whatever the XML spec says about preserving it.

Perhaps It’ll make you scream but I tend to stick xml:space=”preserve” on the top level html element of xhtml files, to give IE a slight hint that inter word spaces perhaps ought to be rendered as spaces rather than being helpfully optimised away…

David

Reply

The content of this field is kept private and will not be shown publicly.