W3C home > Mailing lists > Public > www-forms@w3.org > April 2007

RE: loading instance as .XML page

From: Klotz, Leigh <Leigh.Klotz@xerox.com>
Date: Wed, 25 Apr 2007 14:34:35 -0700
Message-ID: <E254B0A7E0268949ABFE5EA97B7D0CF4031141D2@usa7061ms01.na.xerox.net>
To: <mark.birbeck@x-port.net>, "www-forms" <www-forms@w3.org>

You might be able to use the data: url scheme if you had a way to serialize the instance to a string, either an extension function or an offbox submission that does it.

<xf:bind nodeset="instance('serialized')/dataURI" calculate="concat('data:', instance('results')/serialized)" />
<xf:submission method="post" action="serialize-to-string.cgi" ref="instance('generalRequest')" replace="instance" instance="serialized">
  <xf:load ev:event="xforms-submit-done" show="new" ref="instance('serialized')/dataURI" />

-----Original Message-----
From: www-forms-request@w3.org [mailto:www-forms-request@w3.org] On Behalf Of Mark Birbeck
Sent: Wednesday, April 25, 2007 12:47 PM
To: www-forms
Subject: Re: loading instance as .XML page

Hi Iņaki,

> I would know, is it possible to load a XForms instance in a new page as a
> XML document?
> I tried using:
> <xforms:load show="new" ref="instance('generalRequest')" />

The value that you get from @ref is used as a URL, I'm afraid. The
only way to achieve what you want is to let the instance that you are
trying to retrieve replace the current page, using a submission with
@replace set to "all".

Having said that, it's an interesting use case, and perhaps you should
look at turning it into a feature request. A good place to start would
be to give some illustrations of the kinds of things you are trying to

> but it loads the entire XHTML document another time!
> (I must say that there are a warning 'Instance document did not validate'
> related with this instance)

It's probably because there is no URL in your instance, but I couldn't
be certain.

> And if the instance src attribute loads an XML document with a call to a
> XSLT: will be this XSLT applied in the loaded instance?

Do you mean an XSLT processing instruction is in the XML? I doubt that
this would be processed within an XForms instance.



  Mark Birbeck, formsPlayer

  mark.birbeck@x-port.net | +44 (0) 20 7689 9232
  http://www.formsPlayer.com | http://internet-apps.blogspot.com

  standards. innovation.
Received on Wednesday, 25 April 2007 21:34:47 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:37:56 UTC