The object data to write to the client file is specified via an attribute – i.e., the content of the attribute is the data.
Is this the only possibility?
Actually no – there is another one: use the XML of the entire object – possibly transformed with an XSL. This is specified by omitting attribute in the rule and (optionally) specifying the name of the feed configuration which contains the XSL transformation to apply. For example:
. . .
<rules>
. . .
<item
objectType="letter"
nameExpr="@name"
feed="letter"
updateWF="updateLetter"/>
. . .
</rules>
This segment defines the rule for letter objects whose data is their XML converted by the letter feed. This is presumably some sort of standard XML that an external application can process and edit. If no feed is specified the XML will be the unmodified object XML.
Supported attribute types
What attribute types does the system support when the object data to transfer is specified as an attribute? They are these three:
•Binary data content
•XML
•String
Attempts to use any other attribute type cause an error 1206. In all three cases, the data transferred and saved to the client file is the exact content of the attribute without any conversion. Note that for XML and string attributes this means Unicode encoded in UTF-8.
File extension
The clientSpec objects contain the flag useFileNameExt – which is independent from the selected rule, e.g.:
<clientTemplate
name="Windows"
useFileNameExt="true" . . . >
. . .
The flag useFileNameExt specifies whether the extension corresponding to the file MIME type should be appended to the generated file names. In other word, the name XPath expression in the relevant rule is used to compute the file name as seen above. Then, if useFileNameExt is true, the system appends the extension corresponding to the file data MIME type to this name.
The MIME type of the data is determined as follows:
•data from a string attribute: MIME type = text/plain
•data from an XML attribute: MIME type = application/xml
•data from a binary data content attribute: MIME type = the MIME type of the data stored in the attribute
•if the data is the object’s XML: MIME type = the MIME specified by the feed configuration being used (attribute MimeType) – defaulting to application/xml if there is no specified feed or if the feed does not specify a MIME type.
The extension used for each MIME type is the primary one associated with that MIME type in the gn_MimeTable system table, i.e., the first extension specified in the gn_Extension column.
Path separator
The clientTemplate object contains the pathSeparator setting – that is used independently from the selected rule, e.g.:
<clientTemplate
name="Windows"
pathSeparator="\" . . . >
. . .
The path separator is the character used to separate directory and file names when composing the complete path of a file on the client. It must be "\" for clientTemplate used for Windows client computers, "/" for Unix/Linux clients and ":" for Macintosh clients.