none
OpenXMLValidate method validate(string) missing?!?! RRS feed

  • Question

  • As a newbie using OpenXML I have created a pptx and would like to validate it using the validate method.

    I am using Open XML SDK v2 CTP Aug 2009 where the method is documented here and it looks like it should be possible to send in a string argument.... but when I check with Reflector I can't see a overload with the string argument

    It is also used in the following sample
    http://msdn.microsoft.com/en-us/library/ee412267.aspx


     var errors = validator.Validate(
          presentationFolder + newPresentation);
    Regards from a confused brain
    Tuesday, October 13, 2009 5:00 PM

All replies

  • Another question as a newbie

    What will the Validator Validate?!?!?

    I created a powerpoint document where I by mistake had to identical id:s
    in the sample below I had 2 id="256"

    The validator gave no errors but when I opened the file in Powerpoint Office 2007 it complained and told there is a problem.

    Without knowledge of the schema I feel that having more identical ID:s in a XML file is wrong.


    <p:sldIdLst xmlns:p="http://schemas.openxmlformats.org/presentationml/2006/main">
      <p:sldId id="256" r:id="rId2" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" />
      <p:sldId id="257" r:id="rel257" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" />
    When we speak about XML documents we speak about Wellformed and Valid documents. A valid XML document is following a schema. A validator should find if we have more identical id:s in a document.

    My question: What kind of validation is done by the validate method and where can I read about it?
    Tuesday, October 13, 2009 6:42 PM
  • Check out the following post on how to use the validation functionality within the SDK: http://blogs.msdn.com/brian_jones/archive/2009/09/24/finding-open-xml-errors-with-open-xml-sdk-validation.aspx

    Salgo60 - Thanks for the feedback. We are always looking to improve our functionality. I would recommend looking at the above blog post to get a better understanding of what types of validation the SDK can detect.
    Zeyad Rajabi (MS)
    Tuesday, October 13, 2009 11:05 PM
  • Thanks for the URL You asked for feedback. I feel it is irritating that you create a document and validate it with no errors and then "gives it" to the end-user who gets warnings when he open it using a Office product. A validated document should not give the enduser errors that is the lowest level of validation is my opinion.

    Having non unique ID:s is something that must be found when you validate.
    • Edited by salgo60 Thursday, October 15, 2009 8:55 AM Added line about id:s
    Wednesday, October 14, 2009 6:06 AM
  • Thanks for the feedback. I have certainly added this issue to our bug list.
    Zeyad Rajabi (MS)
    Tuesday, October 27, 2009 12:32 AM