Other functions
xxf:decode-iso9075-14()
The xxf:decode-iso9075-14()
function decodes a string according to ISO 9075-14:2003.
xxf:doc-base64()
The xxf:doc-base64()
function reads a resource identified by the given URL, and returns the content of the file as a Base64-encoded string. It is a dynamic XPath error if the resource cannot be read.
xxf:doc-base64-available()
The xxf:doc-base64-available()
function reads a resource identified by the given URL. It returns true()
if the file can be read, false()
otherwise.
xxf:encode-iso9075-14()
The xxf:encode-iso9075-14()
function encodes a string according to ISO 9075-14:2003. The purpose is to escape any character which is not valid in an XML name.
xxf:image-metadata()
[SINCE Orbeon Forms 4.4]
Access basic image metadata.
The function returns the empty sequence if the URL is empty or the metadata requested is not found.
$content
: URL pointing to an image$name
: metadata property namewidth
: image width in pixels, returns anxs:integer
if foundheight
: image height in pixels, returns anxs:integer
if foundmediatype
: image mediatype based on the content, returns anxs:string
ofimage/jpeg
,image/png
,image/gif
orimage/bmp
(the formats universally supported by browsers) if found
NOTE: The function dereferences the content of the URL when called. Accesses to local files are likely to be faster than remote files.
The following example validates that the image is within 10% of a 1x1 aspect ratio:
Last updated