AW: Stylesheet for Transforming HTML forms to XForms

Hi,

I did my best to include all of your suggestions :)
The new version now transforms xhrml:label elements if they occur
directly before an xforms control or have a "for" attribute.
When there is a <td> parent I leave it as it is, since otherwise it may
wreck any table layouts.
Attached is a new version of my stylesheet and some test cases.
Any feedback is heartly welcome.
Hope you enjoy it.

all the best,
Roman

> -----Ursprüngliche Nachricht-----
> Von: David Landwehr [mailto:david.landwehr@solidapp.com] 
> Gesendet: Mittwoch, 22. Februar 2006 16:17
> An: Huditsch, Roman (LNG-VIE)
> Cc: www-forms@w3.org
> Betreff: Re: Stylesheet for Transforming HTML forms to XForms
> 
> Hi Roman,
> 
> Really excellent and exciting work!
> 
> I have some suggestions:
> 1) the xhtml:form is kept in the resulting document after the 
> transformation. It would be great to remove the element and 
> replace it with a group. The group could have ref="/instance" 
> to remove the requirement for the child controls to have that 
> part in they refs.
> 2) It would really be cool to create a model or instance for 
> each form in the document. That would require proper model 
> namespacing. Because xhtml forms always are separated by its 
> parent form element, that can simply be done using a 
> model/ref with instance('')  on the transforming of  the 
> xhtml:form element like xforms:group ref="instance('ins1')" 
> model="model1".
> 3) A nice feature would be to transform a xhtml:label like:
> <xhtml:label for="ctrl1">Label</xhtml:label><xhtml:input type="input" 
> name="some" value="bb" id="ctrl1"/>
> to
> <xforms:input ref="/instance/some">
>   <xforms:label>Label</xforms:label>
> </xforms:input>
> 
> 4) For input/@type="file" it does not generate a instance 
> element to hold the value. It would be great if it did that 
> and additional specified the type to be e.g. a base 64 
> encoding using xsi:type="xsd:base64Binary".
> 
> If you shared the html files you use to test with it would be 
> much easier to provide you with feedback.
> 
> Again really great work!
> 
> Best regards,
> David
> 
> 
> Huditsch, Roman (LNG-VIE) wrote:
> > Hi,
> >
> > I just tried to write an XSLT stylesheet for transforming 
> simple HTML 
> > forms to their XForms equivalents. I hope that I have 
> considered all 
> > controls mentioned by selfhtml and the "XForms for HTML Authors"
> > document.
> > I would be glad to get any input on it :)
> >
> > wbr,
> > Roman
> >
> > _______________________________________
> >
> > Roman Huditsch
> > IT and Electronic Publishing
> > LexisNexis ARD Orac
> > Marxergasse 25
> > 1030 Vienna
> > Austria
> > ph: +43-1-534 52-1514
> > f: +43-1-534 52-140
> > e-mail roman.huditsch@lexisnexis.at
> > www.lexisnexis.at
> >
> >   
> 
> 
> --
> --------------------------------------------
> David Landwehr (david.landwehr@solidapp.com) Chief Executive 
> Officer, SolidApp
> Web: http://www.solidapp.com
> Office: +45 48268212
> Mobile: +45 24275518
> --------------------------------------------
> 
> 

Received on Thursday, 23 February 2006 12:22:43 UTC