|Scroll Home Prev Top Next More|
The following image-related XPath/XQuery extension functions are supported in the current version of MobileTogether Designer.
Altova extension functions can be used in XPath/XQuery expressions. They provide additional functionality to the functionality that is available in the standard library of XPath, XQuery, and XSLT functions.
•In order to distinguish Altova extension functions from functions in the standard library, Altova extension functions are named in this documentation with a suffix of [altova:]. For example: add-years-to-date [altova:].
•When using Altova extension functions in your XPath/XQuery expressions, however, you must use the function without any prefix or suffix, just as you would use any standard XPath/XQuery function. Use an Altova extension like this: add-years-to-date(xs:date("2014-01-15"), 10).
suggested-image-file-extension(Base64String as string) as string? XP3.1 XQ3.1
Takes the Base64 encoding of an image file as its argument and returns the file extension of the image as recorded in the Base64-encoding of the image. The returned value is a suggestion based on the image type information available in the encoding. If this information is not available, then an empty string is returned. This function is useful if you wish to save a Base64 image as a file and wish to dynamically retrieve an appropriate file extension.
In the examples above, the nodes supplied as the argument of the function are assumed to contain a Base64-encoded image. The first example retrieves jpg as the file's type and extension. In the second example, the submitted Base64 encoding does not provide usable file extension information.
mt-transform-image(Base64Image as Base64BinaryString, Size as item()+, Rotation as xs:integer, Quality as xs:integer) as Base64BinaryString XP3.1 XQ3.1
Takes a Base64-encoded image as its first argument and returns a transformed Base64-encoded image. The second, third, and fourth arguments are the image parameters that are transformed: size, rotation, and quality.
•The Size argument provides three resizing options.
•Rotation can be one of the following values: 90, 180, 270, -90, -180, -270. These are rotation values in degrees of a circle. Positive values rotate the image clockwise; negative values rotate the image counter-clockwise. Note that you can use the Altova Exif attribute OrientationDegree to obtain the current rotation of the image in degrees (0, 90, 180, 270) from the Exif Orientation tag of the image. However, since the OrientationDegree attribute is obtained from the Orientation tag of the Exif data, it will be available only if the Orientation tag is present in the Exif data (see the description of OrientationDegree below).
•Quality can be any value between 0 and 100 and refers to values on the IJG quality scale for JPEG compression; it is not a percentage indicator of quality. The tradeoff is between file size and quality. For a full-color source image, 75 is generally considered an optimal value. If 75 produces unsatisfactory results, increase the value.
Note: If Exif data is present in the original image, it will be removed during the transformation, and the transformed image will not contain Exif data.
image-exif-data(Base64BinaryString as string) as element? XP3.1 XQ3.1
Takes a Base64-encoded JPEG image as its argument and returns an element called Exif that contains the Exif metadata of the image. The Exif metadata is created as attribute-value pairs of the Exif element. The attribute names are the Exif data tags found in the Base64 encoding. The list of Exif-specification tags is given below. If a vendor-specific tag is present in the Exif data, this tag and its value will also be returned as an attribute-value pair. Additional to the standard Exif metadata tags (see list below), Altova-specific attribute-value pairs are also generated. These Altova Exif attributes are listed below.
[ Top ]
© 2019 Altova GmbH