Re: Updating host language attributes

Mark Birbeck wrote:

>><xf:output value="fp:serialise(instance('iSVG'))"/>

It seems to me that the above should display the XML text of the 
instance, not actually modify the HTML page.

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

Yes, this is more like it! The mediatype attribute is the key here to 
determine that the string value in the instance node is not plain text, 
but HTML. OPS for now uses an "appearance" attribute to achieve the same 
goal, but we should probably move to the "mediatype" attribute, as we do 
use that now for images.

But I am thinking that your serialize() functions would still be 
required in the second case, i.e. if you have:

<xforms:instance>
   <img src="..."/>
</xforms:instance>

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

wouldn't work. But it would work with this instance:

<xforms:instance>
   <some-element>&lt;img src="..."/&gt;</some-element>
</xforms:instance>

-Erik

Received on Thursday, 27 October 2005 21:06:59 UTC