Uploaded image for project: 'ODF Toolkit'
  1. ODF Toolkit
  2. ODFTOOLKIT-43

Enabling the validation of documents for ODFDOM

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • odfdom-0.8.6
    • odfdom-0.8.7
    • java
    • None
    • Operating System: All
      Platform: All
    • 66

    Description

      This is comparable smaller task (as much of the source would be generated in the DOM level) and might therefore be even established for 0.8.

      The current idea is to provide a default handler for ODFDOM implementing a new interface quite similar to the SAX ErrorHandler interface:

      http://java.sun.com/javase/6/docs/api/org/xml/sax/ErrorHandler.html

      The handler would be called from our implementation whenever a valid constraint of the ODF 1.2 spec would be ignored.

      E.g. one method for ignoring SHOULD from the spec, another for more severe ignorance of a MUST.

      This validation would embrace not even the validation of XML, but as well other constraints like the compression of a mimetype file on the package layer.

      Validation might be by default disabled for performance reasons and a flag could be set on the OdfPackage, even an enabling of validation on package base might be possible.

      Still one mayor prerequisite for the XML validation seems to be missing:
      During run-time (ie. the creation time of the document) an element have to know if it is allowed to be created at this place. Therefore there have to be available a list of all possible (valid) ODF child (or parent) elements for an element.
      This might be an enumeration on all elements.

      Attachments

        1. ASF.LICENSE.NOT.GRANTED--66-drop-tempfile-usage.patch
          15 kB
          Svante Schubert
        2. ASF.LICENSE.NOT.GRANTED--66-dec-update.patch
          136 kB
          Svante Schubert
        3. ASF.LICENSE.NOT.GRANTED--66-validationIssues.patch
          124 kB
          Svante Schubert
        4. ASF.LICENSE.NOT.GRANTED--66-validator20101122-final.patch
          813 kB
          Svante Schubert
        5. ASF.LICENSE.NOT.GRANTED--66-validation20101115.patch
          181 kB
          Svante Schubert
        6. ASF.LICENSE.NOT.GRANTED--66-validator-review.patch
          158 kB
          Svante Schubert
        7. ASF.LICENSE.NOT.GRANTED--bug66-intermediate20101104.patch
          47 kB
          Svante Schubert
        8. ASF.LICENSE.NOT.GRANTED--bug66-intermediate.patch
          43 kB
          Svante Schubert
        9. ASF.LICENSE.NOT.GRANTED--66-intermediate20101101.patch
          24 kB
          Svante Schubert
        10. ASF.LICENSE.NOT.GRANTED--bug66-validation.patch
          11 kB
          Svante Schubert

        Issue Links

          Activity

            People

              svanteschubert@odftoolkit.org Svante Schubert
              svanteschubert@odftoolkit.org Svante Schubert
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: