- From: Steven Pemberton <steven.pemberton@cwi.nl>
- Date: Fri, 29 Aug 2025 11:46:23 +0000
- To: public-xformsusers@w3.org
One thing to be decided that we don't yet define, is what event to send in the case that dereferencing a URI fails. For <instance src=""/> we use xforms-submit-error (which is non-fatal). For <instance resource=""/> we use xforms-link-error (which is fatal). I favour a non-fatal error in this case, I think. Steven On Friday 29 August 2025 13:17:56 (+02:00), Steven Pemberton wrote: > Here is a first attempt. > > Steven > > Data is obtained by evaluating the value attribute if present, or otherwise from the Single Item Binding if present, and otherwise from the inline data. > > A mediatype is obtained from the mediatype attribute if present, or otherwise from the mediatype child element if any. > > * If the type of the data is xs:anyURI, xf:absoluteIRI, or xf:httpIRI, it is dereferenced, and the result is the data to be rendered; if no mediatype has been specified, the Content-type of the returned data is used. > > * If the type of the data is xs:base64Binary or xs:hexBinary, it is decoded accordingly, to give the data to be rendered. > > * Otherwise the data itself is the data to be rendered. > > If the data to be rendered is non-empty, it is rendered in a suitable way taking into account the datatype of the value, the mediatype if any, the appearance attribute, and localization and internationalization issues such as representation of numbers and dates. > > Implementations should accept mediatypes of at least image/* (including SVG), text/html, application/xhtml+xml, and application/mathml+xml as possible values of mediatype. > > The data is rendered on XForms initialization, and re-rendered whenever there is a change in any node to which the binding or expression refers, or if the mediatype changes. > > Note. Types are obtained from instance data, or from a property on the control. Therefore > > <instance> > <data xmlns=""> > <link>http://example.com/value</link> > </data> > </instance> > <bind ref="link" type="anyURI"/> > ... > <output ref="link"/> > > will cause the URI to be dereferenced, and the resulting data to be rendered. However, > <output value="link"/> > > will cause the string <code>http://example.com/value</code> to be output, since the type of a <code>value</code> attribute is <code>string</code>. > > In that case, you have to add a <code>type</code> attribute to the control: > > <output value="link" type="anyURI"/> > > {Examples to include an SVG example. They already include an HTML example.} > >
Received on Friday, 29 August 2025 11:46:29 UTC