alexbrn / officeotron

Automatically exported from code.google.com/p/officeotron
0 stars 0 forks source link

False validation error for vml part in transitional documents #10

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Validate e.g. fdo42584-2.xlsx ( the second document from the freedesktop 
bugzilla with the bug number 42584) with officeotron. The same works with any 
document containing vml content.

You get for the vmlDrawing1.xml file the following error:
ERROR      - 
(file:/tmp/1abd55c5-60eb-4091-b784-9fdcae3e2f38/xl/drawings/vmlDrawing1.vml:1 
col:195) cvc-elt.1: Cannot find the declaration of element 'xml'.

Looking into Part 4 of the spec which covers transitional elements you discover 
that part 8.1 mentions: "The root element for a part of this content type shall 
be xml in the null namespace, encapsulating an arbitrary amount of VML markup 
as defined by ECMA-376."

which means that the xsd file that is used only applies to all child elements 
of the outer xml element.

Original issue reported on code.google.com by markus.m...@googlemail.com on 13 Dec 2014 at 10:27

GoogleCodeExporter commented 9 years ago
I have a solution to the problem but need to rewrite my patch to make it clean.

The easiest solution seems to ignore the first xml element for vml streams and 
additionally add a check that the first element is realy <xml> with a reference 
to 8.1 (Part 4).

I hacked that together locally and it correctly ignores that element during 
validation.

Original comment by markus.m...@googlemail.com on 14 Dec 2014 at 2:17

GoogleCodeExporter commented 9 years ago
Attached patch fixes the problem and has been seen extensive testing through 
the LibreOffice infrastructure.

Original comment by markus.m...@googlemail.com on 22 Dec 2014 at 12:12

Attachments:

mmohrhard commented 9 years ago

This one has been fixed already.