7.3 Export tool
The export tools exports data from a Daisy repository to a directory or zip
file conforming to the Daisy
For a basic usage scenario, see the
7.3.1 Specifying the set of documents to export
The documents to export are specified in an XML file which is passed to the export tool using the -f option.
The format of this file is as follows:
<?xml version="1.0"?> <documents> <query>select id where true</query> <document id="841-DSY" branch="main" language="default"/> </documents>
Both the query and document elements can be used as many times as desired. The branch and language attributes on the document element are optional.
Only the documents explicitely included via the query or document elements will be part of the export. So for example images included in these documents will not be automatically added.
When using queries, if you also want to export which documents are retired, then you need to include the retired documents too, via a query option:
<?xml version="1.0"?> <documents> <query>select id where true option include_retired = 'true'</query> </documents>
126.96.36.199 Specifying extra schema types, namespaces and collections to export
By default, the export tool will export the subset of the repository schema used by the documents in the export. The same is true for namespaces and collections. If you want to force certain of these items to be part of the export, even when they are not used by the exported documents, you can also list them in the export set file, by using the following elements:
<documentType>...</documentType> <fieldType>...</fieldType> <partType>...</partType> <namespace>...</namespace> <collection>...</collection>
These elements can be mixed between the document and query elements.
It is allowed, but optional, to use the root element exportSet instead of documents.
<?xml version="1.0"?> <exportSet> <query>select id where true</query> <document id="841-DSY" branch="main" language="default"/> <documentType>SimpleDocumentContent"/> <namespace>foo</namespace> </exportSet>