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

Re: XForms and APP clients

From: Nikunj Mehta <nikunj.mehta@oracle.com>
Date: Fri, 01 Jun 2007 09:03:40 -0700
Message-ID: <4660435C.2040203@oracle.com>
To: Elliotte Harold <elharo@metalab.unc.edu>
CC: trs17@pitt.edu, Dustin Whitney <dustin.whitney@gmail.com>, www-forms@w3.org

Elliotte Harold wrote:
> Tyler St. John wrote:
>> What kind of applications is everyone developing with APP??  I'm just 
>> working on a really simple reader/editor.  However, I've ran into 
>> several problems.  I've basically reached a wall in my application 
>> because of the poor ability to handle xhtml content.  This poor 
>> ability may be due to my lack of experience in XForms and APP.  I can 
>> only read in escaped xhtml and not any xhtml wrapped in CDATA.  Any 
>> ideas on what I can do?
>
> Can you elaborate with examples of what you can and cannot do? To my 
> way of thinking, that shouldn't matter, but perhaps I'm not 
> understanding exactly what you're doing.
>
>
So the main issue here is that you cannot present any complex content 
(using XS terminology here), which means no attributes or child elements 
may be created by an xforms:output. Take two basic cases in Atom, where 
that becomes a problem.

Take the following Atom feed:

   <feed xmlns="http://www.w3.org/2005/Atom">

     <title>Example Feed</title>
     <link href="http://example.org/"/>
     <updated>2003-12-13T18:30:02Z</updated>
     <author>
       <name>John Doe</name>
     </author>
     <id>urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6</id>
     <link rel="next" href="http://example.org"/page2"/>

     <entry>
       <title>Atom-Powered Robots Run Amok</title>
       <link href="http://example.org/2003/12/13/atom03"/>
       <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id>
       <updated>2003-12-13T18:30:02Z</updated>
       <summary>Some text.</summary>
     </entry>

   </feed>

I would like to render it using the following XForm model:

<xforms:model id="feed">
    <xforms:instance src="http://example.org/"/>
</xforms:model>

to the following output:
<div>
   <h1>Example Feed</h1>
   <a href="http://example.org/page2">Next page</a>
   <ol>
      <li>John Doe at 2003-12-13T18:30:02Z</li>
      <li><a href="http://example.org/2003/12/13/atom03">Atom-Powered 
Robots Run Amok</a></li>   
    </ol>
</div>

The problem here is that the link cannot be constructed in XForms. 
XForms can dump the href of this link as text on the XHTML output, but 
then it would be of little value in the feed reader.

Moreover, if an entry had the following document,

     <entry>
       <title>Atom-Powered Robots Run Amok</title>
       <link rel="alternate" type="text/html"
        href="http://example.org/2005/04/02/atom"/>
       <link rel="enclosure" type="audio/mpeg" length="1337"
        href="http://example.org/audio/ph34r_my_podcast.mp3"/>
       <id>tag:example.org,2003:3.2397</id>
       <updated>2005-07-31T12:29:29Z</updated>
       <published>2003-12-13T08:29:29-04:00</published>
       <author>
         <name>John Doe</name>
         <uri>http://example.org/</uri>
         <email>f8dy@example.com</email>
       </author>
       <content type="xhtml" xml:lang="en"
        xml:base="http://diveintomark.org/">
         <div xmlns="http://www.w3.org/1999/xhtml">
           <p><i>[Update: The Atom draft is finished.]</i></p>
         </div>
       </content>
     </entry>

I would like to be able to take its content element's div and put it in 
to an XHTML document, which I don't think can be done using XForms 1.0 
or 1.1.

IMHO a decent feed reader or APP client cannot be easily constructed 
using XForms as it is currently speced unless one creates custom controls.

Nikunj
Received on Friday, 1 June 2007 16:04:15 GMT

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