W3C home > Mailing lists > Public > www-forms@w3.org > October 2005

RE: Updating host language attributes

From: Mark Birbeck <mark.birbeck@x-port.net>
Date: Thu, 27 Oct 2005 21:24:39 +0100
Message-ID: <2637FE72-64C8-4F65-BFCD-3918B7D2D415@s15.mail.x-port.net>
To: <andyh@collegenet.com>
Cc: <www-forms@w3.org>, "'Erik Bruchez'" <erik@bruchez.org>

Andy,

> I know this is not your processor, but formsPlayer has a very handy
> extension function called fp:serialise( node-set ).
>
> We use this to output instance data that is actually HTML.
>
> eg.
>
> <xf:instance id="iSVG">
>      <embed id="SVGReport" src="report.svg" width="100%" height="800px"
> type="image/svg+xml"/>
> </xf:instance>
>
>
> <xf:output value="fp:serialise(instance('iSVG'))"/>

I agree that these are really handy features. Another common example of the
same requirement is that Atom and RSS feeds often have mark-up for the story
they refer to, that is 'encoded'. For example:

  <description>
    Hello &lt;em&gt;world&lt;/em&gt;!
  </description>

In version 2 of formsPlayer I think we have a better way to do this, though,
which is to use the XForms 1.1 @mediatype feature. The example you gave
might go something like this:

  <xf:instance id="iSVG">
    <embed id="SVGReport" src="report.svg" width="100%" height="800px"
      type="image/svg+xml"/>
  </xf:instance>

  <xf:output ref="instance('iSVG')" mediatype="text/html" />

Or this:

  <style>
    .report { width: 100%; height: 800px; }
  </style>

  <xf:instance id="iSVG">
    <report src="report.svg" />
  </xf:instance>

  <xf:output ref="@src" mediatype="image/svg+xml" class="report" />

Regards,

Mark


Mark Birbeck
CEO
x-port.net Ltd.

e: Mark.Birbeck@x-port.net
t: +44 (0) 20 7689 9232
w: http://www.formsPlayer.com/

Download our XForms processor from
http://www.formsPlayer.com/
Received on Thursday, 27 October 2005 20:26:13 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 10 March 2012 06:22:02 GMT