Parameter syntax:
[ '[ifNeeded]' ]?
Saves all the documents (which actually need to be saved) currently opened in XXE.
Without this option, this command cannot be executed if no documents at all need to be saved.
With this option, this command does nothing but can be successfully executed even when no documents at all need to be saved.
Returns Command.EXECUTION_FAILED
if no documents at all need to be saved (when [ifNeeded]
is not specified) or if some of the documents which need to be saved, cannot be saved. Otherwise, returns null
.
DITA Example: converting a DITA map to PDF requires all the topics referenced in this map to have been saved to disk.
<command name="dita.convertToPDF"> <macro trace="false"> <sequence> <command name="XXE.saveAll" parameter="[ifNeeded]" /> <command name="dita.guessFileSuffixes" /> <set variable="parameter" expression="%_" plainString="true" /> <command name="selectConvertedFile" parameter="saveFileURLWithExtension=pdf" /> <get expression="concat('"', '%_', '" ', $parameter)" /> <command name="dita.toPDF" parameter="%_" /> </sequence> </macro> </command>