On 6/20/24 18:57, Bryan Pettit wrote:
Thank you for the explanation, Hussein. (And thanks for the clarification on "USLetter"-that question was in the back of my mind as well!)
You're welcome.
A couple of follow-up questions now that I have a better understanding:
1) Is there an xxeconvert command or parameter I can enter to set the
paper.type to use at the time of build? We have an automated build system that
uses some scripting to invoke the xxeconvert command on a VM, and I'm looking
for a way to be able to tell a given build to use A4, another given build to
use USLetter, etc. (One that preferably does not involve logging into the build
system VM, opening the XMLmind GUI, and going through the motions of converting
a document to PDF just to set the paper.type in the Document Conversion
Parameters pane every time I want to print a document with a different
paper.type specification.)
Sure. -p paper.type PAPER_FORMAT. See
https://www.xmlmind.com/xmleditor/_distrib/doc/xxeconvert/using_it_to_convert.html
A5 example:
---
xxeconvert -p paper.type A5 db51.toPSFile
src/10xxe/docsrc/xxeconvert/xxeconvert.xml -s pdf -s "|pdf" -u
~/tmp/out/xxeconvert_A5.pdf
---
This -p command-line option has priority over any other setting.
2) Is it safe to assume that the Document Conversion Parameters settings modify
the background file that XMLmind/xxeconvert calls for a specific conversion (in
my case, db51.toPSFile)? I.e., my custom transformation file should really not
include any parameters that are part of the Document Conversion Parameters pane
for a particular conversion (because the Conversion Parameters take precedence
over the custom transformation file)?
No. Document Conversion Parameters settings do not modify any XSLT
transformation file, whether stock or custom.
Like any other configuration customization facility, the "Document
Conversion Parameters" settings creates, modifies or deletes a "private"
XML file called "XXE_USER_PREFS_DIR/custom/DocBook 5.1/custom.incl".
For example, if using the "Document Conversion Parameters" settings, I
set paper.type to USletter (default is A4), I get this "custom.incl":
---
<cfg:configuration xmlns:xslt="http://www.w3.org/1999/XSL/Transform"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xila="http://www.w3.org/2001/XInclude/local-attributes"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:trans="http://docbook.org/ns/transclusion"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:m="http://www.w3.org/1998/Math/MathML"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:db="http://docbook.org/ns/docbook"
xmlns:cfg="http://www.xmlmind.com/xmleditor/schema/configuration">
<cfg:parameterGroup name="DocBook 5.1.db51.toPS.transformParameters">
<cfg:parameter name="paper.type">USletter</cfg:parameter>
</cfg:parameterGroup>
</cfg:configuration>
---
Therefore, it makes sense to include in your custom XSLT transformation
file *all* the parameters/attribute sets you consider to be *your*
*defaults*, and this, independently of what the end user can change
interactively using the the "Document Conversion Parameters" settings.
--
XMLmind XML Editor Support List
xmleditor-support@xmlmind.com
http://www.xmlmind.com/mailman/listinfo/xmleditor-support