- From: Sebastian Schnitzenbaumer <schnitz@mozquito.com>
- Date: Fri, 7 Sep 2001 18:46:31 +0200
- To: CULANG Stéphane <Stephane.CULANG@France-boissons.fr>
- Cc: <www-forms@w3.org>
- Message-ID: <D0F1529EE943B3449F755CA1A40887465B3D68@winserver.windomain.mozquito.com>
Stephane,
here is how it works:
I've took your <produit.xml>, uploaded it
to Mozquito's new XForms public trial server
after I created a directory for you at:
http://solutions.mozquito.com/www-forms/culang/produit.xml
Then I wrote the following XForm (attached: <produit.xhtml>):
---
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//MOZQUITO//DTD XML-UI 1.0//EN"
"http://www.mozquito.org/dtd/xhtml-fml1.dtd">
<html xmlns="http://www.w3.org/1999/html401"
xmlns:xf="http://www.w3.org/2001/06/xforms"
xmlns:fml="http://www.mozquito.com/fml"
xmlns:xl="http://www.w3.org/1999/xlink"
>
<head>
<title>XML-UI Example: S. CULANG's produit.xml</title>
<meta name="author" content="Sebastian Schnitzenbaumer" />
<xf:xform id="produit">
<xf:instance id="whatever" xl:href="produit.xml" />
</xf:xform>
</head>
<body>
<h1>Produit</h1>
<p>
Designation:
<fml:textinput ref="PRODUIT/BOISSON/DESIGNATION" xform="produit" /><br
/>
Type:
<fml:textinput ref="PRODUIT/BOISSON/TYPE" xform="produit" /><br />
Quantité:
<fml:textinput ref="PRODUIT/BOISSON/QUANTITE" xform="produit" /><br />
Prix:
<fml:textinput ref="PRODUIT/BOISSON/PRIX" xform="produit" /><br />
</p>
</body>
</html>
---
Uploaded it, too, in the same directory where I put <produit.xml>,
under:
http://solutions.mozquito.com/www-forms/culang/produit.xhtml
As you can see, I've simply referenced the <produit.xml> XML file
with an XLink from the <xf:instance> element in the <head>.
Next, in the <body>, I'm now accessing parts of your <produit.xml>
XML File with the "ref" attribute on the <fml:textinput> form controls
- voila!
I then went on, having the XForms display not only the first
<boisson> element, but *all* <boisson> elements.
The attached <produit_advanced.xhtml> shows how:
---
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//MOZQUITO//DTD XML-UI 1.0//EN"
"http://www.mozquito.org/dtd/xhtml-fml1.dtd">
<html xmlns="http://www.w3.org/1999/html401"
xmlns:xf="http://www.w3.org/2001/06/xforms"
xmlns:fml="http://www.mozquito.com/fml"
xmlns:xl="http://www.w3.org/1999/xlink"
>
<head>
<title>XML-UI Example: S. CULANG's produit.xml</title>
<meta name="author" content="Sebastian Schnitzenbaumer" />
<xf:xform id="produit">
<xf:instance id="whatever" xl:href="produit.xml" />
</xf:xform>
</head>
<body>
<h1>Produit</h1>
<p>
<xf:repeat nodeset="PRODUIT/BOISSON" id="whatever">
Designation:
<fml:textinput ref="DESIGNATION" xform="produit" /><br />
Type:
<fml:textinput ref="TYPE" xform="produit" /><br />
Quantité:
<fml:textinput ref="QUANTITE" xform="produit" /><br />
Prix:
<fml:textinput ref="PRIX" xform="produit" /><br />
</xf:repeat>
</p>
</body>
</html>
---
To be seen running at:
http://solutions.mozquito.com/www-forms/culang/produit_advanced.xhtml
What happens now is that the XForms <repeat> element
iterates over the nodeset returned by the PRODUIT/BOISSON
XPath. The XPath's on the FML textinput element's ref attribute
now have to be relative and not absolute as before!
All the best,
- Sebastian
> -----Original Message-----
> From: CULANG Stéphane [mailto:Stephane.CULANG@France-boissons.fr]
> Sent: Friday, September 07, 2001 5:36 PM
> To: Sebastian Schnitzenbaumer
> Subject: RE: writing xforms
>
>
> Hello,
>
> I'm a beginner in both xml and xforms and would like to
> receive a copy of
> your reply.
>
> Btw, here is a very simple XML file that i'd like to work on
> with xforms.
>
> Thanks.
>
> <<produit.xml>>
>
> > -----Message d'origine-----
> > De: Sebastian Schnitzenbaumer [SMTP:schnitz@mozquito.com]
> > Date: vendredi 7 septembre 2001 16:12
> > À: Adarsh
> > Cc: www-forms@w3.org
> > Objet: RE: writing xforms
> >
> > Adarsh,
> >
> > can you send me the XML you want to use as input
> > for the XForm you're planning? Based on the XML,
> > I'll explain to you the entire process of
> > developing an XForm that takes the XML as input
> > and runs in IE.
> >
> > Thanks,
> >
> > - Sebastian
> >
> > > -----Original Message-----
> > > From: Adarsh [mailto:adarsh@cmcltd.com]
> > > Sent: Thursday, September 06, 2001 12:08 PM
> > > To: www-forms@w3.org
> > > Subject: writing xforms
> > >
> > >
> > > Hello i am new to Xforms and i am interested in developing some.
> > > I have gone through the new draft released and i want to know
> > > where can i
> > > get the list of available xform tags and how to run the
> xform in IE.
> > > I have also read that input can be got in the form of a XML
> > > what should i do
> > > inorder to do so.
> > > Thanks in Advance
> > > Adarsh
> > >
> > >
>
Attachments
- application/octet-stream attachment: produit_advanced.xhtml
- text/xml attachment: produit.xml
- application/octet-stream attachment: produit.xhtml
Received on Friday, 7 September 2001 12:47:03 UTC