Fonctions XPath/XQuery : Relatives aux images
Les fonctions d'extension XPath/XQuery relatives à l'image suivantes sont prises en charge dans la version actuelle de MobileTogether Designer.
Note concernant le nommage de fonctions et de l'applicabilité de la langue
Les fonctions d'extension Altova peuvent être utilisées dans les expressions XPath/XQuery. Elles fournissent des fonctions supplémentaires aux fonctions d'ores et déjà disponibles dans la librairie standard des fonctions XPath, XQuery et XSLT. •Afin de distinguer les fonctions d'extension Altova des fonctions dans la librairie standard, les fonctions d'extension Altova sont nommées dans cette documentation avec un suffixe [altova:]. Par exemple : add-years-to-date [altova:]. •Néanmoins, lorsque vous utilisez des fonctions d'extension Altova dans vos expressions XPath/XQuery, vous devez utiliser la fonction sans préfixe ou suffixe, comme si vous utilisiez une fonction standard XPath/XQuery. Voici un exemple d'extension Altova : 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 ]