Skip to content
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

Make ODT output pass validation and add DC meta data #1359

Closed
vkbo opened this issue Feb 12, 2023 · 1 comment · Fixed by #1360
Closed

Make ODT output pass validation and add DC meta data #1359

vkbo opened this issue Feb 12, 2023 · 1 comment · Fixed by #1360
Assignees
Labels
bug Issue: Something isn't working build tool Component: Exports or the build tool
Milestone

Comments

@vkbo
Copy link
Owner

vkbo commented Feb 12, 2023

Extracted from #622

The ODT export document doesn't pass validation in the official ODF Validator.

The document should:

  • Pass validation as "extended conformant ODF1.3"
  • Include the Dublin Core elements and Office Meta elements as seen in the XML below, which is what LibreOffice generates if the document is opened and saved by it.
<office:meta>
  <meta:creation-date>2023-02-01T14:10:22.242714318</meta:creation-date>
  <meta:generator>LibreOffice/7.0.4.2$Linux_X86_64 LibreOffice_project/00$Build-2</meta:generator>
  <meta:editing-cycles>2</meta:editing-cycles>
  <meta:editing-duration>PT52S</meta:editing-duration>
  <dc:title>Sample Project</dc:title>
  <meta:initial-creator>Jane Smith</meta:initial-creator>
  <dc:date>2023-02-01T14:10:30.182583978</dc:date>
  <dc:creator>Veronica Olsen</dc:creator>
</office:meta>
@vkbo vkbo added bug Issue: Something isn't working build tool Component: Exports or the build tool labels Feb 12, 2023
@vkbo vkbo added this to the Release 2.0.5 milestone Feb 12, 2023
@vkbo vkbo self-assigned this Feb 12, 2023
@vkbo
Copy link
Owner Author

vkbo commented Feb 12, 2023

Version 2.0.4 produces the following validation result:

Sample Project (Invalid).odt: Info: ODF version of root document: 1.2
internal:/schema/odf1.2/OpenDocument-v1.2-os-manifest-schema.rng: Info: parsed.
Sample Project (Invalid).odt/META-INF/manifest.xml: Info: no errors, no warnings
Sample Project (Invalid).odt/mimetype: Info: no errors, no warnings
Sample Project (Invalid).odt: Info: Media Type: application/vnd.oasis.opendocument.text
internal:/schema/odf1.2/OpenDocument-v1.2-os-schema.rng: Info: parsed.
Sample Project (Invalid).odt/meta.xml: Info: Generator: novelWriter/2.0.4
Sample Project (Invalid).odt/meta.xml: Info: no errors, no warnings
Sample Project (Invalid).odt/settings.xml[2,91]: Error: element "office:document-settings" is missing "version" attribute
ames:tc:opendocument:xmlns:office:1.0"><office:settings/></office:document-sett ----^ Sample Project (Invalid).odt/settings.xml: Info: 1 errors, no warnings
Sample Project (Invalid).odt/styles.xml: Info: extension attribute 'loext:opacity' of element <style:text-properties> found and ignored.
Sample Project (Invalid).odt/styles.xml: Info: extension attribute 'loext:opacity' of element <style:text-properties> found and ignored.
Sample Project (Invalid).odt/styles.xml: Info: extension attribute 'loext:opacity' of element <style:text-properties> found and ignored.
Sample Project (Invalid).odt/styles.xml: Info: extension attribute 'loext:opacity' of element <style:text-properties> found and ignored.
Sample Project (Invalid).odt/styles.xml: Info: extension attribute 'loext:opacity' of element <style:text-properties> found and ignored.
Sample Project (Invalid).odt/styles.xml[2,5629]: Error: tag name "style:header-first" is not allowed. Possible tag names are: <a>,<animate>,<animateColor>,<animateMotion>,<animateTransform>,<audio>,<caption>,<circle>,<command>,<connector>,<control>,<custom-shape>,<ellipse>,<footer>,<forms>,<frame>,<g>,<header-left>,<iterate>,<layer-set>,<line>,<measure>,<notes>,<page-thumbnail>,<par>,<path>,<polygon>,<polyline>,<rect>,<regular-polygon>,<scene>,<seq>,<set>,<transitionFilter>
t:p></style:header><style:header-first><text:p text:style-name="Header"/></styl ----^ Sample Project (Invalid).odt/styles.xml: Info: 1 errors, no warnings
Sample Project (Invalid).odt/styles.xml: Info: 5 extension attributes from the following namespace were found: urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0
Sample Project (Invalid).odt/content.xml[2,2192]: Error: element "text:h" is missing "outline-level" attribute
e:text><text:h text:style-name="Title">My Novel</text:h><text:p text:style-name ----^ Sample Project (Invalid).odt/content.xml[2,9597]: Error: element "text:h" is missing "outline-level" attribute
text:p><text:h text:style-name="Title">Sequel Novel</text:h><text:p text:style- ----^ Sample Project (Invalid).odt/content.xml: Info: 2 errors, no warnings
Sample Project (Invalid).odt/content.xml: Info: 5 extension attributes from the following namespace were found: urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0
internal:/schema/odf1.2/OpenDocument-v1.2-os-dsig-schema.rng: Info: parsed.
Sample Project (Invalid).odt: Info: 4 errors, no warnings

@vkbo vkbo mentioned this issue Feb 12, 2023
6 tasks
@vkbo vkbo linked a pull request Feb 12, 2023 that will close this issue
6 tasks
@vkbo vkbo closed this as completed Feb 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue: Something isn't working build tool Component: Exports or the build tool
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant