Hi
I have a similar problem as
http://www.docx4java.org/forums/docx-java-f6/problem-with-document-created-by-google-docs-t1802.html and
http://www.docx4java.org/forums/docx-java-f6/parsing-error-when-reading-a-document-from-google-docs-t2160.html with documents from Google Docs.
I resolved it by changing my mc-preprocessor.xslt:
- Code: Select all
<xsl:template match="w:spacing/@w:after" >
<xsl:attribute name="w:after"><xsl:value-of select="format-number(., '#')" /></xsl:attribute>
</xsl:template>
Complete mc_preprocessor.xslt file :
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:java="http://xml.apache.org/xalan/java"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main"
xmlns:wordml2010="http://schemas.microsoft.com/office/word/2010/wordml"
xmlns:wordml201011="http://schemas.microsoft.com/office/word/2010/11/wordml"
version="1.0" exclude-result-prefixes="java">
<!-- This is a mc:AlternateContent pre-processor.
It selects the mc:Fallback content, which
docx4j 2.7.0 ought to be able to handle.
See MainDocumentPart's unmarshall method
for an example of ...