emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Vaidheeswaran C <vaidheeswaran.chinnaraju@gmail.com>
To: "Monroe, Will" <wtmonroe.ls@gmail.com>
Cc: orgmode <emacs-orgmode@gnu.org>
Subject: Re: Missing org-mode manual page:  Validating OpenDocument XML
Date: Wed, 04 Mar 2015 09:57:59 +0530	[thread overview]
Message-ID: <54F689CF.8030905@gmail.com> (raw)
In-Reply-To: <54F62C87.3070500@gmail.com>

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
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 

  reply	other threads:[~2015-03-04  4:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-03 15:11 Missing org-mode manual page: Validating OpenDocument XML Monroe, Will
2015-03-03 20:26 ` Vaidheeswaran C
2015-03-03 21:49   ` Monroe, Will
2015-03-04  4:27     ` Vaidheeswaran C [this message]
2015-03-04 13:37       ` Will Monroe
2015-03-04 16:00         ` Vaidheeswaran C
2015-03-04 21:13           ` Monroe, Will

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54F689CF.8030905@gmail.com \
    --to=vaidheeswaran.chinnaraju@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=wtmonroe.ls@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).