This document contains a small list of know-how related to dealing with the OOXML format.
Problem: XML files must not contains xml namespace aliases starting with xml
prefix.
Example: Bad alias: xml123
, good alias: a123
.
Solution: Use different alias names.
Problem: The Ignorable attribute must contain valid XML namespace aliases.
It is a problem because many XML processors hide the aliases after parsing the XML document.
Solution: keep track of and reuse the xml ns alias names.
See also: Requires
attribute of the Choice
tag.
The root node in the numbering definition must contain an Ignorable
tag (which can be also empty). Needed for Word.
Problem: space symbols disappear from the document.
Solution: Use the xml:space="preserve"
attribute consequently.
Problem: LibreOffice will not open an OOXML file if the relationships file contains an XML namespace alias.
Solution: Generate relationships files without XML namespace aliases (enforce the use of default XML namespace alias).
Problem: The zip entry paths mut not contain a ../
part.
+-------------+
| _rels/.rels | < this is the entry point
+-------------+
|
v
+-------------------+ +------------------------------+
| word/document.xml |===| word/_rels/document.xml.rels |
+-------------------+ +------------------------------+
| | |
v | v
+--------------------+ | +------------------+ +-----------------------------+
| word/numbering.xml | | | word/header1.xml |===| word/_rels/header1.xml.rels | * references images
+--------------------+ | +------------------+ +-----------------------------+
> shared across all v
+-----------------+
| word/styles.xml | > shared across all
+-----------------+
Can you improve this documentation?Edit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close