<xf:output>
supports a mediatype
attribute on that element allowing display of other media types.<xf:output>
control to display an image, you need to:mediatype
attribute on the <xf:output>
. That attribute must refer to an image mediatype, such as image/*
or image/jpeg
.value
attribute on <xf:output>
or bind to the control to a node without type, with an xs:anyURI
type or with an xs:base64Binary
type.<xf:output>
. It is possible to dynamically change the image pointed to. For example:file:
resource. While this URI is not visible from the client web browser, the output control automatically proxies it so that the end user can see the image.<xf:output>
control has a mediatype
attribute with value text/html
, the value of the node to which the control is bound is interpreted as HTML content. Consider the following XForms instance:<xf:output>
control to the html-content
node as follows:mediatype
is not specified, the result would be instead: "This is in bold!". In the XForms instance, the HTML content must be escaped as text. On the other hand, the following content will not work as expected:mediatype="text/html"
, an HTML <div>
element will be generated by the XForms engine to hold the HTML data. As in HTML a <div>
cannot be embedded into a <p>
, if you have a <xf:output mediatype="text/html">
control, you should not put that control into a <xh:p>
.<xf:output>
supports the xxf:download
appearance, which causes the the resource identified by the single-node binding to be downloadable through a link.<xf:upload>
, when using this appearance, <xf:mediatype>
and <xf:filename>
children elements are allowed (but not the <xxf:size>
element). When serving the file, if these elements are present, they are passed to the resulting HTTP response to provide mediatype and file name hints to the browser. Example:xs:anyURI
or xs:base64Binary
.<xf:header>
child element allows specifying custom headers to set on the HTTP request.<xf:header>
is the same as the <xf:header>
child element of <xf:submission>
.