Re: XFDL Integration

Posted by Alessandro Vernet on
URL: https://discuss.orbeon.com/XFDL-Integration-tp32484p32494.html

Jency,

OK, I see. I modified the XSL in xfdl-to-xhtml.xpl to use relative
positioning instead of absolute positioning when there is an <below
compute="itemprevious">. You can see this in the attached file.
However this doesn't give us yet the result we want, as in CSS
relative positioning is relative to the container, not the previous
element.

It seems that what we need here is a way to position a box relative to
the bottom of another box which is itself positioned absolutely. I am
not sure how we can do that in CSS. Any idea?

Alex

On 2/18/07, Jency Chackummoottil <[hidden email]> wrote:

>
>
>
>
>
>
> Hi Alex,
>
>
>
> In Workplace forms, we can handle this using relative positioning. In the
> XFDL I sent you earlier, the control beneath the repeat table is positioned
> using absolute positioning. Attached please find the XFDL with relative
> positioning.
>
>
>
>               <button sid="BUTTON3">
>
>                   <xforms:trigger>
>
>                      <xforms:label>Save Form</xforms:label>
>
>                      <xforms:action
> ev:event="DOMActivate"></xforms:action>
>
>                   </xforms:trigger>
>
>                   <itemlocation>
>
>                      <x>140</x>
>
>                      <y>333</y>
>
>                      <below compute="itemprevious"></below>
>
>                      <offsetx>132</offsetx>
>
>                      <offsety>12</offsety>
>
>                   </itemlocation>
>
>                   <fontinfo>
>
>                      <fontname>Arial</fontname>
>
>                      <size>8</size>
>
>                      <effect>bold</effect>
>
>                   </fontinfo>
>
>                   <help>HELP1</help>
>
>   </button>
>
> The itemlocation tag (positioned using relative positioning) has to be
> converted to the corresponding html.
>
>
>
> Thanks in advance
>
> Jency
>
>
>
> -----Original Message-----
>  From: [hidden email] [mailto:[hidden email]] On Behalf Of Alessandro
> Vernet
>  Sent: Saturday, February 17, 2007 4:12 AM
>  To: [hidden email]
>  Subject: Re: [ops-users] XFDL Integration
>
>
>
>
> And here are the screenshots mentioned in my email earlier.
>
>
>
> Alex
>
>
>
> On 2/16/07, Alessandro Vernet <[hidden email]> wrote:
>
> > Hi Jency,
>
> >
>
> > The first time you do an insert, the position of the "Save Form"
>
> > button is fine (see insert-1st.png attached). But the second time,
>
> > since that button is positioned with absolute coordinates, it gets
>
> > displayed over the form fields (see insert-2nd.png attached). How does
>
> > the Workplace Forms client handle this? Could you do the equivalent
>
> > screenshots in Workplace Forms?
>
> >
>
> > Alex
>
> >
>
> > On 2/14/07, Jency Chackummoottil
> <[hidden email]> wrote:
>
> > >
>
> > > Hi,
>
> > > There was an error in the XPL that I sent last day; in handling the
>
> > > repeats. Please find the attached XPL that handles repeats correctly.
>
> > > But the issue is not completely solved. Suppose there are controls
>
> > > beneath the repeat controls. The controls inside the repeat grow
>
> > > dynamically, but the controls beneath the repeat stay in their position
>
> > > (since they are positioned using absolute positioning) [Attached please
>
> > > an XFDL file which uses repeat controls. Run this xfdl against the xpl
>
> > > and click the Insert New button]. As the repeat controls grow, the
>
> > > controls beneath them too must move down.
>
> > >
>
> > > Any help would be much appreciated.
>
> > >
>
> > > Thanks in advance
>
> > > Jency
>
> > >
>
> > >
>
> > > -----Original Message-----
>
> > > From: Jency Chackummoottil
>
> > > [mailto:[hidden email]]
>
> > > Sent: Tuesday, February 13, 2007 12:52 PM
>
> > > To: [hidden email]
>
> > > Subject: RE: [ops-users] XFDL Integration
>
> > >
>
> > >
>
> > > Hi,
>
> > >
>
> > > I have made slight modifications in the xpl to reflect the following
>
> > > changes:
>
> > > 1) For controls such as button, textarea, select, and select1, the style
>
> > > attribute is applied directly to the controls. [Applying style such as
>
> > > background color, width, font etc to div does not make any effect on
>
> > > these controls]
>
> > > 2) Repeats are handled. [Not accurate; needs modification]
>
> > >
>
> > > Attached please find the xfdl which contains Repeat controls and the xpl
>
> > > which handles the Repeat controls. The form should appear as if in the
>
> > > attached screen shot. But with the attached xpl, the repeat controls are
>
> > > not positioned correctly. I'm not sure whether the method used here is
>
> > > correct. Please help me to rectify this problem.
>
> > >
>
> > > Also, the issue with <format> tag is not yet solved.
>
> > >
>
> > > Hope you could help me out in solving these issues.
>
> > >
>
> > > Thanks in advance
>
> > > Jency
>
> > >
>
> > >
>
> > > -----Original Message-----
>
> > > From: Jency Chackummoottil
>
> > > [mailto:[hidden email]]
>
> > > Sent: Wednesday, February 07, 2007 6:07 PM
>
> > > To: [hidden email]
>
> > > Subject: RE: [ops-users] XFDL Integration
>
> > >
>
> > >
>
> > > Thanks a lot Alex. The code has now become generic so that it is
>
> > > applicable for any controls.
>
> > >
>
> > > Now, the issue is with the <format> tag.
>
> > > <format>
>
> > >   <datatype>string</datatype>
>
> > >         <constraints>
>
> > >           <length>
>
> > >           <min>0</min>
>
> > >           <max>20</max>
>
> > >        </length>
>
> > >     </constraints>
>
> > >  </format>
>
> > > We need to convert all the constraints in the <format> tag in XFDL to
>
> > > the corresponding xforms:bind attributes in XForms.
>
> > >
>
> > > Another issue is that the width and height of an input control cannot be
>
> > > set using <xhtml:div style="position:absolute; top: 53; left: 131;
>
> > > width: 154; height: ;>.
>
> > >
>
> > > Hope you can help me in solving these issues.
>
> > >
>
> > > Thanks in advance
>
> > > Jency
>
> > >
>
> > > -----Original Message-----
>
> > > From: [hidden email] [mailto:[hidden email]] On Behalf Of
>
> > > Alessandro Vernet
>
> > > Sent: Wednesday, February 07, 2007 1:28 PM
>
> > > To: [hidden email]
>
> > > Subject: Re: [ops-users] XFDL Integration
>
> > >
>
> > > Hi Jency,
>
> > >
>
> > > I took your pipeline and updated it; the updated pipeline attached. A
>
> > > few comments:
>
> > >
>
> > > - Not that it matters much, but since the XSL file was very simple, I
>
> > > just got rid of it. So you can call this pipeline from your
>
> > > page-flow.xml with view="xfdl-to-xhtml.xpl" (no model).
>
> > > - It is now "generic" in the sense that it supports any level of
>
> > > nesting (see how templates are being used)
>
> > > - Alerts for controls display next to the control (not at the top left
>
> > > of the page)
>
> > > - It copies some of the styles defined in XFDL over to XHTML (in
>
> > > particular the background color, font face and size)
>
> > >
>
> > > Things not yet taken care of:
>
> > >
>
> > > - There is a second language selection drop-down at the bottom of the
>
> > > page. That second drop-down is copied over from the XFDL file. Is it
>
> > > supposed to be there?
>
> > > - Repeats are not handled.
>
> > >
>
> > > You can see what it looks like in the attached screenshot. I hope this
>
> > > helps, and let us know how things are going with your conversion from
>
> > > XFDL to XHTML.
>
> > >
>
> > > Alex
>
> > >
>
> > > On 2/5/07, Jency Chackummoottil
> <[hidden email]>
>
> > > wrote:
>
> > > > Alex,
>
> > > >
>
> > > > I'm attaching my source code to transform XFDL to XHTML+ XForms along
>
> > > > with this. Apply this XSL to the attached XFDL. You can see that the
>
> > > > constraints in the <format> tag are not applied. We need to convert
>
> > > all
>
> > > > these constraints in the <format> tag in XFDL to the corresponding
>
> > > > xforms:bind attributes in XForms. Also, see the alert icon coming in
>
> > > the
>
> > > > top left corner. Also, the width for input controls is not set.
>
> > > >
>
> > > > Another problem with this code is that it is not generic. As branching
>
> > > > increases, (eg, xforms:group has got more number of branches than
>
> > > > xforms:output), the looping too goes deeper. I don't think this is a
>
> > > > good way to write XSL. For eg, there can be any number of xforms:group
>
> > > > control under another xforms:group. Is there any generic way, so that
>
> > > we
>
> > > > can optimize the code for any controls?
>
> > > >
>
> > > > Hope you can help me out in solving the issues.
>
> > > >
>
> > > > Thanks in advance
>
> > > > Jency
>
> > > >
>
> > > > -----Original Message-----
>
> > > > From: [hidden email] [mailto:[hidden email]] On Behalf Of
>
> > > > Alessandro Vernet
>
> > > > Sent: Monday, February 05, 2007 1:04 PM
>
> > > > To: [hidden email]
>
> > > > Subject: Re: [ops-users] XFDL Integration
>
> > > >
>
> > > > Hi Jency,
>
> > > >
>
> > > > On 1/31/07, Jency Chackummoottil
>
> > > > <[hidden email]> wrote:
>
> > > > > One difficulty I faced during the transformation of XFDL to XHTML
>
> > > > using
>
> > > > > XSLT is that in XFDL, we can set the datatype for an input field,
>
> > > its
>
> > > > > min length, max length etc using a non-xform tag (<format>). Please
>
> > > > > refer the attached XFDL document. But in xforms, we add this in
>
> > > > > xforms:model using xforms:bind. So, using XSLT, we need to convert
>
> > > all
>
> > > > > these constraints in the <format> tag in XFDL to the corresponding
>
> > > > > xforms:bind attributes in XForms.
>
> > > >
>
> > > > Now I see the <format> element which I overlooked the first time I
>
> > > > went through your XFDL example. So we can have things like:
>
> > > >
>
> > > > <format>
>
> > > >    <datatype>string</datatype>
>
> > > >    <constraints>
>
> > > >       <length>
>
> > > >          <min>0</min>
>
> > > >          <max>20</max>
>
> > > >       </length>
>
> > > >    </constraints>
>
> > > > </format>
>
> > > >
>
> > > > > Another problem I faced is related to the alert icon. I have set
>
> > > some
>
> > > > > constraints on certain fields and using XSLT, I placed all the
>
> > > > controls
>
> > > > > in correct position. But if a constraint failed, the alert icon is
>
> > > > shown
>
> > > > > at the top left corner.
>
> > > >
>
> > > > Are you saying that you would like the alert icon to be displayed next
>
> > > > to the field but that it gets displayed at the top left corner? If
>
> > > > this is the case, I don't know why this would happen. I would have to
>
> > > > try this out.
>
> > > >
>
> > > > > Also, not all the controls are positioned with absolute coordinates.
>
> > > > For
>
> > > > > eg, the controls placed inside a xforms:repeat are not positioned
>
> > > > using
>
> > > > > absolute coordinates.
>
> > > >
>
> > > > Yes, that is an interesting case. And I don't fully understand yet how
>
> > > > the repeat works in XFDL just by looking at the example. But before we
>
> > > > tackle this down, we can start with the 2 other issues you mentioned.
>
> > > >
>
> > > > I have some ideas on how to convert the <format> into binds, but the
>
> > > > devil lies in the details of the implementation. So rather than trying
>
> > > > to describe it, I would like to give it a try. Do you have some code
>
> > > > already to do this conversion in XSLT? Would you be willing to
>
> > > > contribute it and share it with the community so we can build on it?
>
> > > > And who knows, if this experiment is successful, this could even ship
>
> > > > out of the box with Orbeon Forms.
>
> > > >
>
> > > > Alex
>
> > > > --
>
> > > > Orbeon Forms - Web Forms for the Enterprise, Done the Right Way
>
> > > > http://www.orbeon.com/
>
> > > >
>
> > > >
>
> > > >
>
> > > > --
>
> > > > You receive this message as a subscriber of the
>
> > > [hidden email] mailing list.
>
> > > > To unsubscribe:
> mailto:[hidden email]
>
> > > > For general help: mailto:[hidden email]?subject=help
>
> > > > ObjectWeb mailing lists service home page:
>
> > > http://www.objectweb.org/wws
>
> > > >
>
> > > >
>
> > > >
>
> > >
>
> > >
>
> > > --
>
> > > Orbeon Forms - Web Forms for the Enterprise, Done the Right Way
>
> > > http://www.orbeon.com/
>
> > >
>
> > >
>
> > >
>
> > > --
>
> > > You receive this message as a subscriber of the [hidden email]
> mailing list.
>
> > > To unsubscribe:
> mailto:[hidden email]
>
> > > For general help: mailto:[hidden email]?subject=help
>
> > > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>
> > >
>
> > >
>
> > >
>
> >
>
> >
>
> > --
>
> > Orbeon Forms - Web 2.0 Forms for the Enterprise
>
> > http://www.orbeon.com/
>
> >
>
>
>
>
>
> --
>
> Orbeon Forms - Web 2.0 Forms for the Enterprise
>
> http://www.orbeon.com/
>
>
>
> --
> You receive this message as a subscriber of the [hidden email]
> mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>
>
>

--
Orbeon Forms - Web 2.0 Forms for the Enterprise
http://www.orbeon.com/


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws

xfdl-to-xhtml.xpl (9K) Download Attachment