Page 1 of 1

Problems Formatting WordML documents

Posted: Mon Feb 07, 2005 11:27 pm
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]

Posted: Mon Feb 07, 2005 11:54 pm
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...

Sample please

Posted: Tue Feb 08, 2005 9:54 am
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.

Problem found

Posted: Tue Feb 08, 2005 11:14 am
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.

Posted: Tue Feb 08, 2005 5:24 pm
by echomanhce
Excellent! Thank you so much!