Re: xf:output, @mediatype and @value

Hi John,

John Boyer wrote:
> The configuration of using mediatype with the value attribute is
> explicitly not supported by the specification.
>
> [...]
>
> The correct way to activate the feature would be like this:
> 
> <xf:model ... namespace declarations ...>
>    <xf:instance>
>       <myData xmlns="">
>          ...
>          <image>myPicture.png</image>
>       </myData>
>    </xf:instance>
> 
>    <xf:bind nodeset="myPicture" type="xsd:anyURI" />
>    ...
> </xf:model>
> ...
> <xf:output ref="myPicture" mediatype="image/*"> ... </xf:output>
> 
> So, it's not that the feature isn't there.  It's just that the feature
> is activated via different markup.  

This way of displaying an image is clear and also supported by Mozilla
XForms.

> In this situation, a particular
> implementation has added/supported a custom alternative markup pattern.
>  I hesitate to call it an "extension" because usually that term is
> reserved for things which are not otherwise achievable by the
> specification.  While it is usually the case that one reports a bug when
> something doesn't appear, in this case the implementation should receive
> a bug report because the image does appear when the value attribute is
> used to provide an image filename.  This is necessary in order to avoid
> creating exactly this kind of confusion across implementations, and it
> also helps to ensure that the correct markup pattern is used to activate
> the feature in a way that is interoperable across implementations.

OK. So you suggest removing support for that markup variation and filing
a bug report with Orbeon? What should we output instead? The string (and
ignoring @mediatype) or nothing (as the string cannot be displayed as
image)?

@Erik Bruchez: why did you add this variation in the first place? Do you
see a use case for this?

Philipp



> From: 	Philipp Wagner <news@philipp-wagner.com>
> To: 	www-forms@w3.org
> Date: 	08/11/2009 02:11 PM
> Subject: 	xf:output, @mediatype and @value
> 
> 
> ------------------------------------------------------------------------
> 
> 
> 
> Hi,
> 
> recently Mozilla XForms got a bug report [1] that the following is not
> working:
> 
> <xf:output mediatype="image/png" value="'xml.png'"/>
> 
> Expected behavior was displaying the image. The real use case for this
> remains unclear (you could just use a html:img in that case or whatever
> the host language provides you to display images).
> 
> While the fix is straightforward, a question remains:
> Are we always supposed to treat @value as anyURI if @mediatype is set to
> "image/*"? Orbeon seems to do this for at least this case as well [2].
> Are there other cases where we should/could make such an assumption?
> 
> A clarification would be greatly appreciated.
> 
> Philipp
> 
> 
> [1] https://bugzilla.mozilla.org/show_bug.cgi?id=507621
> [2]
> http://www.orbeon.com/ops/doc/reference-xforms-guide#xforms-image-mediatype

Received on Wednesday, 12 August 2009 16:48:36 UTC