W3C home > Mailing lists > Public > www-forms@w3.org > August 2009

Re: xf:output, @mediatype and @value

From: John Boyer <boyerj@ca.ibm.com>
Date: Wed, 12 Aug 2009 11:53:41 -0700
To: Philipp Wagner <news@philipp-wagner.com>
Cc: ebruchez@orbeon.com, "www-forms@w3.org" <www-forms@w3.org>
Message-ID: <OF6DF8AE24.7BA35D89-ON88257610.006776F6-88257610.0067CAE7@ca.ibm.com>
Hi Philipp,

The most natural reading is that the mediatype attribute is simply ignored 
when an output has a value attribute and not a single node binding. Output 
with a single node binding can be further qualified by the mediatype 
attribute.  Output with a value attribute only shows the string result of 
the value attribute's expression.

John M. Boyer, Ph.D.
STSM, Interactive Documents and Web 2.0 Applications
Chair, W3C Forms Working Group
Workplace, Portal and Collaboration Software
IBM Victoria Software Lab
E-Mail: boyerj@ca.ibm.com 

Blog: http://www.ibm.com/developerworks/blogs/page/JohnBoyer
Blog RSS feed: 

Philipp Wagner <news@philipp-wagner.com>
08/12/2009 09:52 AM
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

> 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

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


> 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]
Received on Wednesday, 12 August 2009 18:54:38 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:36:22 UTC