Skip to content

PowerPoint2007 writer schema validation test case#307

Merged
Progi1984 merged 11 commits into
PHPOffice:developfrom
chriskapp:develop
Apr 10, 2017
Merged

PowerPoint2007 writer schema validation test case#307
Progi1984 merged 11 commits into
PHPOffice:developfrom
chriskapp:develop

Conversation

@chriskapp
Copy link
Copy Markdown
Contributor

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 ppt
based 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

}
}

$objWriter->endElement();
Copy link
Copy Markdown
Member

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 ?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

# Conflicts:
#	src/PhpPresentation/Writer/PowerPoint2007/PptCharts.php
#	src/PhpPresentation/Writer/PowerPoint2007/PptSlides.php
#	tests/PhpPresentation/Tests/Writer/PowerPoint2007/PptSlidesTest.php
@Progi1984
Copy link
Copy Markdown
Member

@k42b3 Could you update the Changelog.md for adding your improvements, please ? Have you another modifications in this PR ?

@Progi1984 Progi1984 added this to the 0.9.0 milestone Apr 10, 2017
@chriskapp
Copy link
Copy Markdown
Contributor Author

Hi, ok I have updated the changelog. So basically it adds only the test case and changes percentage format.

@Progi1984 Progi1984 merged commit 3708462 into PHPOffice:develop Apr 10, 2017
@Progi1984
Copy link
Copy Markdown
Member

@k42b3 Very good job. I just merged it.

@chriskapp
Copy link
Copy Markdown
Contributor Author

Thats great, thx!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants