-
Notifications
You must be signed in to change notification settings - Fork 533
PowerPoint2007 writer schema validation test case #307
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -1457,8 +1457,6 @@ protected function writeParagraphs(XMLWriter $objWriter, $paragraphs, $bIsPlaceh | |||
$objWriter->endElement(); | |||
} | |||
} | |||
|
|||
$objWriter->endElement(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@k42b3 Why do you remove this ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@k42b3 That generates some errors in unit tests : https://travis-ci.org/PHPOffice/PHPPresentation/jobs/192111234#L353
# Conflicts: # src/PhpPresentation/Writer/PowerPoint2007/PptCharts.php # src/PhpPresentation/Writer/PowerPoint2007/PptSlides.php # tests/PhpPresentation/Tests/Writer/PowerPoint2007/PptSlidesTest.php
@k42b3 Could you update the Changelog.md for adding your improvements, please ? Have you another modifications in this PR ? |
Hi, ok I have updated the changelog. So basically it adds only the test case and changes percentage format. |
@k42b3 Very good job. I just merged it. |
Thats great, thx! |
Hi, this adds a new schema test case which validates the produced XML from the
PowerPoint2007
writer against the ECMA/ISO
Office Open XML File Formats
XSD. In the test (tests/PhpPresentation/Tests/Writer/PowerPoint2007/SchemaTest.php) we basically generate a pptbased on the sample files and then check whether the generated XML is valid against the schema. This should help to protect us from generating the wrong format. Of course this test covers only the elements which are used but it is a start.
The test brought up an issue: Microsoft generates percentage values formatted as 1000th of a percent
but the standard requires it to be formatted with a trailing percent sign. I have adjusted the writer so that
the values are generated accordingly to the schema.
See: https://msdn.microsoft.com/en-us/library/gg548608(v=office.12).aspx