W3C home > Mailing lists > Public > public-forms@w3.org > August 2011

FW: [ACTION-1803] XForms Transformation Module

From: Philip Fennell <Philip.Fennell@marklogic.com>
Date: Wed, 17 Aug 2011 09:09:29 -0700
To: "public-forms@w3.org" <public-forms@w3.org>
Message-ID: <D20C296D14127D4EBD176AD949D8A75A6841E4B2@EXCHG-BE.marklogic.com>
This is the link to the wiki page I created  for a Transformation element that describes a transformation in a similar way to that for an submission:


See also the e-mail below.



From: Philip Fennell
Sent: Wednesday, June 01, 2011 1:18 PM
To: public-forms@w3.org
Subject: [ACTION-1803] XForms Transformation Module


I have created a new wiki page for the proposed 'XForms Transformation Module'


Which uses the 'XForms Submission Module' as a template for defining a transformation element that declares a transformation on an XForms instance. It does not attempt to explain how the transformation is invoked beyond mentioning that it would be done via referencing the transformation's ID. The simple case of the transform being referenced by URI is described.

However we still need to think about how one deals with transforms referenced from an XForms instance. Personally I would not have a problem with the transform only being referenced from an XForms instance. If that were the case then you have all the existing mechanisms for loading the transform:

<instance id="view-tx" src=""/>

<instance id="view-tx" resource=""/>

<instance id="view-tx">
  <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

and via an xf:submission to a named instance. Further more you have all the associated error handling that you can use too.

The question would be: what are the operational overheads of using an XForms instance to the hold the transform as opposed to referencing it directly.

Some other alternatives that I haven't written-up on the wiki, as yet, include the following use and extension of the resource element. The first two are standard, the third re-uses the instance and ref attributes from the parent transformation element. The final four take a leaf from XProc's book and define the 'type' of a resource as XML document, unparsed character data (XQuery), in-line mark-up or an XForms instance. XProc seems to have solved the problem of XML documents vs. Text formats by use of the p:document and p:data instructions for a stylesheet/query input source port which equates to the XForms submission/transformation resource.

<transformation id="tx" ref="instance('data')" instance="view">

  <!-- Transform URI value from instance data. -->
  <resource value="/link[@rel = 'stylesheet']/@href"/>

  <!-- Transform URI value from a static string value. -->

  <!-- Transform from an XForms instance data. -->
  <resource instance="view-tx" ref="/"/>

  <!-- Transform is an XML document (XSLT or XProc). -->
    <document href="/tx/foo.xsl" content-type="application/xslt+xml"/>

  <!-- Transform is unparsed text (XQuery). -->
    <data href="/tx/foo.xqy" content-type="application/xquery"/>

  <!-- Define the transform in-line within the transformation declaration. -->
      <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

  <!-- The transform is contained within an XForms instance. -->
    <instance ref="instance('view-tx')"/>


Philip Fennell
MarkLogic Corporation

Phone +44 (0) 203 402 3619  |  Mobile +44 (0) 7824 830 866

email  Philip.Fennell@marklogic.com<mailto:Firstname.Lastname@marklogic.com>
web    www.marklogic.com<http://www.marklogic.com/>

This e-mail and any accompanying attachments are confidential. The information is intended solely for the use of the individual to whom it is addressed. Any review, disclosure, copying, distribution, or use of this e-mail communication by others is strictly prohibited. If you are not the intended recipient, please notify us immediately by returning this message to the sender and delete all copies. Thank you for your cooperation.
Received on Wednesday, 17 August 2011 16:10:05 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:14:05 UTC