Problems Formatting WordML documents

Having trouble installing Oxygen? Got a bug to report? Post it all here.
echomanhce
Posts: 3
Joined: Mon Feb 07, 2005 11:15 pm

Problems Formatting WordML documents

Post by echomanhce »

As near as I can tell, Oxygen 5.1 has some problems formatting Word 2003 documents saved as XML. When I try to format this document, I get the following:

Code: Select all


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<?mso-application progid="Word.Document"?>
<w:wordDocument xmlns:w="http://schemas.microsoft.com/office/word/2003/wordml"
xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w10="urn:schemas-microsoft-com:office:word"
xmlns:sl="http://schemas.microsoft.com/schemaLibrary/2003/core"
xmlns:aml="http://schemas.microsoft.com/aml/2001/core"
xmlns:wx="http://schemas.microsoft.com/office/word/2003/auxHint"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" w:macrosPresent="no"
w:embeddedObjPresent="no" w:ocxPresent="no" xml:space="preserve"><o:DocumentProperties><o:Author>...
The rest of the document is left entirely on the last line. The last character of the last line is at position 18516.

Given the enormous number of tags in WordML, this is really hard to work with. Right now, I'm forced to manually insert carriage returns between tags...

Is there any way to configure Oxygen to do the formatting for me? Is this a bug, or a feature that's not yet implemented?[/code]
echomanhce
Posts: 3
Joined: Mon Feb 07, 2005 11:15 pm

Post by echomanhce »

Okay, well I found a work around - with the Word 2003 XML Toolkit installed, I can save the XML of the document as a nicely formatted text file. This formatting is preserved in oXygen, so I can edit it and do fun stuff.

I am still curious as to why oXygen's formatting is failing on the unformatted document...
Radu
Posts: 9018
Joined: Fri Jul 09, 2004 5:18 pm

Sample please

Post by Radu »

Hi,

Thank you for your input.
It would be very helpful if you could send us a sample of the xml file for which this behaviour is obtained. We don't need the whole document but only a small sample for which we can reproduce the problem.


Regards, Radu.
Radu
Posts: 9018
Joined: Fri Jul 09, 2004 5:18 pm

Problem found

Post by Radu »

Hi, we managed to find the problem, so no need to send a sample.

The <w:wordDocument> tag has the "xml:space="preserve" attribute set so all it's child elements are excluded from the formatting process.
So you just have to remove the attribute and then the formatting process should work correctly.

Regards, Radu.
echomanhce
Posts: 3
Joined: Mon Feb 07, 2005 11:15 pm

Post by echomanhce »

Excellent! Thank you so much!
Post Reply