[XML-DEV Mailing List Archive Home]
[By Thread]
[By Date]
[Recent Entries]
[Reply To This Message]
Re: Serialising XML Schema to HTML form and getting it backas
- From: Lech Rzedzicki <xchaotic@gmail.com>
- To: "xml-dev@lists.xml.org" <xml-dev@lists.xml.org>
- Date: Sun, 10 Oct 2010 05:42:00 +0200
Thank you for such a throughout reply Philip!
I would very much be biased in favour of using Xforms client side, although it still looks like I'll be sending HTML + JS over the wire, so the benefits over server side are more related to future proofing and promoting a good standard than anything else, I guess.
Now I need to do some advocacy on XForms in particular and XRX in general. Could someone have any useful resources on that too? Again - having attended quite a few events, I have gathered enough confidence and enthusiasm to try and consider such approach in production, but what I've seen were mostly proof of concept demos with specific piece of technology (Sausalito, Oracle or MarkLogic), rather than generic XRX propaganda...
Lech On 8 October 2010 17:15, Philip Fennell <Philip.Fennell@marklogic.com> wrote:
If you are going to use XForms, and I'd recommend it for the case you describe, then you shouild, depending on how you want to serve-up the forms, use either a server-side XForms implementation like Orbeon or betterForms, otherwise you
should look at XSLTForms or Formular if you want to do things client-side.
Depending upon how the schemas are constructed it is not too difficult to transform (XSLT) from an XML Schema into XForms and for validation you can either take one of two approaches:
1) Use Schema Validation within the XForms, then you get validation on the spot (structure and values).
2) Depending on the amount and type of validation (values only) you could generate XForms constraints that will provide validation of user input.
The former you get for free with XForms, the latter you have to generate as part of the transformation.
> but it looks like XForms are still not natively supported in the
> browsers so I think not much has changes in recent years and
> we'll have to generate HTML Forms from the schema.
Have a good long look at the implementations page on the XForms Wiki:
<http://www.w3.org/MarkUp/Forms/wiki/XForms_Implementations>
Native support there may not be but there has been considerable movement amongst both client-side and server-side implementations, many (if not all) supporting a lot of XForms 1.1 features and also adding XPath 2 which is very handy
for constraint expressions.
If you go down the XForms route you'll save yourself a lot of hassle in the long run compared to trying to re-invent the same features with HTML Forms, JavaScript and server-side code. After all, the majority of the XForms implementations
that deliver HTML Forms + JavaScript have, in effect, done all that work for you.
Regards
Philip Fennell
Consultant
MarkLogic Corporation
Mobile +44 (0) 7824 830 866
email
Philip.Fennell@marklogic.com
web 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.
Hi all.
We have a XML schema that we would like to use to:
1. generate HTML form/XForm/ whatever works bests.
2. User fills in the form fields in a browser, with as much validation possible client side (probably some JS library).
3. The form is sent back to the server, ideally as XML instance straight away or converted server side so that it can be validated against the schema and stored.
What's the current state of the art in this?
It's a greenfield project so we're free to use whatever we want, but it looks like XForms are still not natively supported in the browsers so I think not much has changes in recent years and we'll have to generate HTML Forms from the schema.
It looks equally backwards when sending/POSTing the data - it looks like the data will be sent using the usual HTTP headers and then we have to worry how we convert it back into XML for validation, right?
Any thoughts on how to do it as automatically and pain free as possible, would be very welcome.
Lech
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
|
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format
RSS 2.0 |
|
Atom 0.3 |
|
|
Stylus Studio has published XML-DEV in RSS and ATOM formats,
enabling users to easily subcribe to the list from their preferred news reader application.
|
Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website.
they were not included by the author in the initial post. To view the content without the Sponsor Links please
click here.
|
|