openpreserve / odf-validator

Open source Open Document Format (ODF) validation
http://odf.openpreservation.org/
BSD 3-Clause "New" or "Revised" License
3 stars 0 forks source link

ODF_10: Sub-document detection #98

Closed carlwilson closed 7 months ago

carlwilson commented 8 months ago

Subdocuments MUST NOT be present.

A master document lets you manage large documents, such as a book with many chapters. The master document can be seen as a container for individual LibreOffice Writer files. The individual files are called subdocuments.

A document within a package may consist of a set of files creating a unit, for instance the set of files specified by OpenDocument Part 3. These files may be located in the root of the package, or within a directory.

If they are contained in the root of the package, they are called document. If they are located within a directory, the document they constitute is called a sub document. A package may contain multiple sub documents, but only a single document can be contained in the root of the package. Unless otherwise stated, the term document refers to the document contained in the root of the package. This may include sub documents

Subdocuments are seen as a form of embedding and is prohibited. Rigsarkivet will only permit one document per package. That is sub documents are not permitted.

This implies that there should not be any subfolders except META-INF

However a master document can only have the extension .odm and the mimetype application/vnd.oasis.opendocument.text-master so this is the test that will be used.