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 21:30:43 +0530 Message-ID: <54F72C2B.2000301@gmail.com> References: <54F5CF1A.20500@gmail.com> <54F618E5.10109@gmail.com> <54F62C87.3070500@gmail.com> <54F689CF.8030905@gmail.com> <54F70AB7.4080509@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]:48627) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YTBhG-0000e9-Fe for emacs-orgmode@gnu.org; Wed, 04 Mar 2015 10:58:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YTBhA-0005XA-9z for emacs-orgmode@gnu.org; Wed, 04 Mar 2015 10:58:54 -0500 Received: from mail-pd0-x22d.google.com ([2607:f8b0:400e:c02::22d]:36160) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YTBh9-0005Ww-U2 for emacs-orgmode@gnu.org; Wed, 04 Mar 2015 10:58:48 -0500 Received: by pdbnh10 with SMTP id nh10so34782529pdb.3 for ; Wed, 04 Mar 2015 07:58:47 -0800 (PST) In-Reply-To: <54F70AB7.4080509@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: Will Monroe Cc: orgmode In your init.el search for undo-tree and remove it (temporarily) Or do M-x list-packages and uninstall the undo-tree elpa package. loext:contextual-spacing comes from your styles file. Find out where the style file comes from. If you are using Org package from non-GNU repositories, I would strongly recommend that you install from official GNU repositories. i.e., C-h v package-archives and remove all the non-GNU or non-Orgmode repos. On Wednesday 04 March 2015 07:07 PM, Will Monroe wrote: > Thanks so much for your reply! I think I'm getting closer to > understanding what's happening. > > On 03/03/2015 10:27 PM, Vaidheeswaran C wrote: >> 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. > > After following these instructions, I got the following results in Message: > > ,---- > | For information about GNU Emacs and the GNU system, type C-h C-a. > | Loading ox-odt... > | Debug (ox-odt): Searching for OpenDocument styles files... > | Debug (ox-odt): Trying /usr/share/emacs/etc/org/styles/... [2 times] > | Debug (ox-odt): Trying /home/will/.emacs.d/etc/styles/... > | Debug (ox-odt): Trying > /home/will/.emacs.d/elpa/org-20150223/etc/styles/... > | Debug (ox-odt): Using styles under > /home/will/.emacs.d/elpa/org-20150223/etc/styles/ > | Debug (ox-odt): Searching for OpenDocument schema files... > | Debug (ox-odt): Trying /usr/share/emacs/etc/org/schema/... [2 times] > | Debug (ox-odt): No OpenDocument schema files installed > | Loading ox-odt...done > `---- > > These style files are the same ones I've used in prior exports in which > I've seen the errors that I reported in my earlier emails. I note the > absence of OpenDocument schema files. As I understand it, they're aren't > essential for the export to ODT process but are used for troubleshooting > instead. Perhaps I've misunderstood that though. > >> c) Proceed with export > > I opened the same .org file that I'd had trouble exporting and used `C-c > o O' to invoke export to ODT and then to prompt the file to be opened in > LibreOffice Writer 4.2.7.2. It opened without any of the problems I'd > seen previously. The Messages output is below. > > ,---- > | LaTeX to MathML converter not available. > | Formatting LaTeX using verbatim > | Embedding /home/will/Dropbox/org/panopto-create-recording.png as > Images/0001.png... > | Wrote /tmp/odt-3818xsy/meta.xml > | Using vacuous schema [2 times] > | Saving file /tmp/odt-3818xsy/styles.xml... > | Wrote /tmp/odt-3818xsy/styles.xml > | Using vacuous schema > | Wrote /tmp/odt-3818xsy/mimetype > | Using vacuous schema > | Saving file /tmp/odt-3818xsy/META-INF/manifest.xml... > | Wrote /tmp/odt-3818xsy/META-INF/manifest.xml > | Saving file /tmp/odt-3818xsy/content.xml... > | Wrote /tmp/odt-3818xsy/content.xml > | (No changes need to be saved) > | Creating ODT file... > | Running zip -mX0 work.odt mimetype > | Running zip -rmTq work.odt . > | Created /home/will/Dropbox/org/work.odt > | Parsing archive file...done. > | Running soffice --nologo --writer /home/will/Dropbox/org/work.odt...done > `---- > > I noted that none of the "undo-tree" duplicate xml files that were cited > as errors in the OpenDocument validator showed up. > >> 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.... > > I'm using LibreOffice 4.2.7.2. Although I've used style options--I > think I just had them listed as #+OPTIONS--I removed them in earlier > tests to see if they were causing problems. > > After running this test, I tried it out again with my usual > configuration. I got the same LibreOffice "input/output" errors and saw > this in Messages: > > ,---- > | Formatting LaTeX using verbatim > | Embedding /home/will/Dropbox/org/panopto-create-recording.png as > Images/0001.png... > | Wrote /tmp/odt-37886-H/meta.xml > | Using vacuous schema > | Local Ispell dictionary set to american > | Using vacuous schema > | Local Ispell dictionary set to american > | Saving file /tmp/odt-37886-H/styles.xml... > | Wrote /tmp/odt-37886-H/.styles.xml.~undo-tree~ > | Wrote /tmp/odt-37886-H/styles.xml > | Using vacuous schema > | Local Ispell dictionary set to american > | Wrote /tmp/odt-37886-H/mimetype > | Using vacuous schema > | Local Ispell dictionary set to american > | Saving file /tmp/odt-37886-H/META-INF/manifest.xml... > | Wrote /tmp/odt-37886-H/META-INF/.manifest.xml.~undo-tree~ > | Wrote /tmp/odt-37886-H/META-INF/manifest.xml > | Saving file /tmp/odt-37886-H/content.xml... > | Wrote /tmp/odt-37886-H/.content.xml.~undo-tree~ > | Wrote /tmp/odt-37886-H/content.xml > | (No changes need to be saved) > | Creating ODT file... > | Running zip -mX0 work.odt mimetype > | Running zip -rmTq work.odt . > | Created /home/will/Dropbox/org/work.odt > | Parsing archive file...done. > | Running soffice --nologo --writer /home/will/Dropbox/org/work.odt...done > `---- > > Just as i have with every other attempt using my normal configuration > from my custom init.el, these messages about "undo-tree" xml files appear. > > After testing all of this, I've learned that my existing version of > LibreOffice is working, my Emacs and org-mode Lisp files are fine, and > that the *.org file that I want to export to ODT can be exported > successfully. > > So what is causing the "undo-tree" error and what is causing the > "loext:contextual-spacing" errors? With regard to the "undo-tree" > errors, since I've been able to overcome them by eliminating my init.el, > I am under the impression that the problem lies there and that I need to > scrutinize my config to find out what's going wrong. The approach that > comes to mind is to remove all my org-mode settings, see if exporting > works and then to slowly add the settings back. > > But the other error, "loext:contextual-spacing", is something I have no > idea about. > > Your replies have been immensely helpful. I'm still very much a > beginner and it helps to have a dialogue with someone about problems > like these that are ambiguous, at least to me. > > If you have any other suggestions for how to proceed, please don't hold > back. I'm learning a lot this way. > > All the best, > > Will > >> >> ---------------------------------------------------------------- >> >> 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 >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >> > >