From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vaidheeswaran C Subject: Re: Missing org-mode manual page: Validating OpenDocument XML Date: Wed, 04 Mar 2015 09:57:59 +0530 Message-ID: <54F689CF.8030905@gmail.com> References: <54F5CF1A.20500@gmail.com> <54F618E5.10109@gmail.com> <54F62C87.3070500@gmail.com> Reply-To: vaidheeswaran.chinnaraju@gmail.com Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41546) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YT0sl-0005jw-Va for emacs-orgmode@gnu.org; Tue, 03 Mar 2015 23:26:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YT0si-0007h4-LM for emacs-orgmode@gnu.org; Tue, 03 Mar 2015 23:26:03 -0500 Received: from mail-pa0-x232.google.com ([2607:f8b0:400e:c03::232]:44189) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YT0si-0007gy-9K for emacs-orgmode@gnu.org; Tue, 03 Mar 2015 23:26:00 -0500 Received: by padet14 with SMTP id et14so6109883pad.11 for ; Tue, 03 Mar 2015 20:25:59 -0800 (PST) In-Reply-To: <54F62C87.3070500@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: "Monroe, Will" Cc: orgmode I am not sure what is happening. Some suggestions: 1. C-h v temporary-file-directory. Check this variable, particularly if your are on Windows machine. 2. Load Emacs without your custom settings. a) emacs -Q -L /path/to/org/library (`-L' option not needed if org comes from your Emacs installation.) b) Once Emacs is loaded, do M-x load-library ox-odt Note where the styles and schema files come from. c) Proceed with export 3. I will focus on XML errors like "loext:contextual-spacing" etc. The style file used by the exporter comes from `OrgOdtStyles.xml' (Check messages buffer for where this file comes from). This file has no such attributes. Which version of LibreOffice you are using? Where did you get style files from? Are you using #+ODT_STYLES_FILE option etc.... ---------------------------------------------------------------- On Wednesday 04 March 2015 03:19 AM, Monroe, Will wrote: > On 3/3/15 2:26 PM, Vaidheeswaran C wrote: >> On Tuesday 03 March 2015 08:41 PM, Monroe, Will wrote: >>> Hello, >>> >>> I'm trying to troubleshoot a corrupt ODT file that I've exported from org-mode. >>> The org-mode manual provides some guidance for this process on the "Validating >>> OpenDocument XML" page (see >>> http://orgmode.org/manual/Validating-OpenDocument-XML.html#Validating-OpenDocument-XML). >>> >>> >>> It mentions validation of an ODT document against the "OpenDocument RELAX NG >>> Compact Syntax (RNC) schema". I have obtained the xml and RNC files from the >>> org-mode Github site but I'm unsure how to use them. The org-mode manual page >>> mentions general help in the Introduction (see >>> http://orgmode.org/nxml-mode/Introduction.html#Introduction) but I get a 404 >>> error when I attempt to load the page. >>> >>> Does anyone know where I can read this guide? >> You can avoid the cross-manual link errors, by using the manuals at >> gnu.org site: >> >> https://www.gnu.org/software/emacs/manual/html_node/org/Validating-OpenDocument-XML.html >> >> For verification, this is roughly what you need to do: >> >> 1. Copy over schema file. >> 2. Reload Emacs. >> 3. C-x C-f file.odt >> 4. Press ENTER on content.xml >> 5. C-c C-n (M-x rng-next-error) >> >> Or >> >> You can try an online validator:http://odf-validator.rhcloud.com/ >> >> Based on my own experience, your *.org file is NOT in utf-8 and uses >> non-English characters (whatever they are called). Just switch the >> file to utf-8 encoding and you will be all set. > Hello, > > Thanks for your reply. I checked the text formatting of the .org document and > it was utf-8 (confirmed by Emacs "U" in the modeline). I also tried exporting > it again and looking at the Messages--can't believe I didn't do that to begin > with--and I saw this: > > ,---- > | LaTeX to MathML converter not available. > | Formatting LaTeX using verbatim > | Embedding /Users/wmonro1/Dropbox/org/panopto-create-recording.png as > Images/0001.png... > | Wrote /var/folders/_r/333b9wt92kncthm2ph8wpp59b0ccdd/T/odt-66242t3k/meta.xml > | Using schema ~/Dropbox/emacs/org-odt-schema/schema/od-schema-v1.2-os.rnc [2 times] > | Saving file > /var/folders/_r/333b9wt92kncthm2ph8wpp59b0ccdd/T/odt-66242t3k/styles.xml... > | Wrote > /var/folders/_r/333b9wt92kncthm2ph8wpp59b0ccdd/T/odt-66242t3k/.styles.xml.~undo-tree~ > | Wrote /var/folders/_r/333b9wt92kncthm2ph8wpp59b0ccdd/T/odt-66242t3k/styles.xml > | Using vacuous schema > | Wrote /var/folders/_r/333b9wt92kncthm2ph8wpp59b0ccdd/T/odt-66242t3k/mimetype > | Using vacuous schema > | Saving file > /var/folders/_r/333b9wt92kncthm2ph8wpp59b0ccdd/T/odt-66242t3k/META-INF/manifest.xml... > | Wrote > /var/folders/_r/333b9wt92kncthm2ph8wpp59b0ccdd/T/odt-66242t3k/META-INF/.manifest.xml.~undo-tree~ > | Wrote > /var/folders/_r/333b9wt92kncthm2ph8wpp59b0ccdd/T/odt-66242t3k/META-INF/manifest.xml > | Saving file > /var/folders/_r/333b9wt92kncthm2ph8wpp59b0ccdd/T/odt-66242t3k/content.xml... > | Wrote > /var/folders/_r/333b9wt92kncthm2ph8wpp59b0ccdd/T/odt-66242t3k/.content.xml.~undo-tree~ > | Wrote /var/folders/_r/333b9wt92kncthm2ph8wpp59b0ccdd/T/odt-66242t3k/content.xml > | (No changes need to be saved) > | Creating ODT file... > | Running zip -mX0 work.odt mimetype > | Running zip -rmTq work.odt . > | Created /Users/wmonro1/Dropbox/org/work.odt > | Parsing archive file...done. > | Running open /Users/wmonro1/Dropbox/org/work.odt...done > | Parsing archive file...done. > `---- > > The presence of the /.content.xml.~undo-tree~, /.manifest.xml.~undo-tree~, and > /.styles.xml.~undo-tree~ got my attention. After submitting the document to the > online validator (default settings used), these files, undoubtedly created by my > personal inspection in Emacs, showed up again: > > ,---- > | Details: > | work.odt: Info: ODF version of root document: 1.2 > | work.odt/META-INF/manifest.xml: Error: The file '.content.xml.~undo-tree~' > shall be listed in the 'META-INF/manifest.xml' file as it exists in the ODF > package 'work.odt'! > | work.odt/META-INF/manifest.xml: Error: The file '.styles.xml.~undo-tree~' > shall be listed in the 'META-INF/manifest.xml' file as it exists in the ODF > package 'work.odt'! > | work.odt/META-INF/manifest.xml: Error: The file > 'META-INF/.manifest.xml.~undo-tree~' shall be listed in the > 'META-INF/manifest.xml' file as it exists in the ODF package 'work.odt'! > | work.odt/META-INF/manifest.xml: Warning: The directory 'Images/' is not a > sub-document and should not be listed in the 'META-INF/manifest.xml' file of ODF > package 'work.odt'! > | internal:/schema/odf1.2/OpenDocument-v1.2-cos01-manifest-schema.rng: Info: parsed. > | work.odt/META-INF/manifest.xml: Info: 3 errors, 1 warnings > | work.odt/mimetype: Info: no errors, no warnings > | work.odt: Info: Media Type: application/vnd.oasis.opendocument.text > | internal:/schema/odf1.2/OpenDocument-v1.2-cos01-schema.rng: Info: parsed. > | work.odt/meta.xml: Info: Generator: > | work.odt/meta.xml: Info: no errors, no warnings > | work.odt/styles.xml[2,6289]: Error: unexpected attribute > "loext:contextual-spacing" > | work.odt/styles.xml[2,7187]: Error: unexpected attribute > "loext:contextual-spacing" > | work.odt/styles.xml[2,7885]: Error: unexpected attribute > "loext:contextual-spacing" > | work.odt/styles.xml[2,15357]: Error: unexpected attribute > "loext:contextual-spacing" > | work.odt/styles.xml[2,16222]: Error: unexpected attribute > "loext:contextual-spacing" > | work.odt/styles.xml[2,25655]: Error: unexpected attribute > "loext:contextual-spacing" > | work.odt/styles.xml[2,26198]: Error: unexpected attribute > "loext:contextual-spacing" > | work.odt/styles.xml[2,26482]: Error: unexpected attribute > "loext:contextual-spacing" > | work.odt/styles.xml[2,27530]: Error: unexpected attribute > "loext:contextual-spacing" > | work.odt/styles.xml[2,28689]: Error: unexpected attribute > "loext:contextual-spacing" > | work.odt/styles.xml[2,29340]: Error: unexpected attribute > "loext:contextual-spacing" > | work.odt/styles.xml[2,34718]: Error: unexpected attribute > "loext:contextual-spacing" > | work.odt/styles.xml[2,43716]: Error: unexpected attribute "loext:rel-width-rel" > | work.odt/styles.xml: Info: 13 errors, no warnings > | work.odt/content.xml: Info: no errors, no warnings > | internal:/schema/odf1.2/OpenDocument-v1.2-cos01-dsig-schema.rng: Info: parsed. > | work.odt: Info: 16 errors, 1 warnings > `---- > > So my best guess is that I need to remove ~undo-tree files to generate an ODT > file that is valid. Although I'm at a loss as to where these files might be. > I've checked in .emacs.d/elpa/org, where my org-mode is installed and in the > default `org-odt-data-dir' that I set. > > Am I on the right track? If so, is there another place where the style files > might reside? > > Will > > > > > > > > > > > >