RE: Updating host language attributes

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 UTC