Altova Mailing List Archives

Re: [xml-dev] Serialising XML Schema to HTML form and getting it back

From: Lech Rzedzicki <xchaotic@-----.--->
To: "xml-dev@-----.---.---" <-------@-----.---.--->
Date: 10/10/2010 3:46:00 AM
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


On 8 October 2010 17:15, Philip Fennell <Philip.Fennell@m...>wrote:

>   Lech,
> 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:
> <>
> 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@m...
>  <Philip.Fennell@m...>web
>  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.
>  ------------------------------
> *From:* Lech Rzedzicki [xchaotic@g...]
> *Sent:* 08 October 2010 14:58
> *To:* xml-dev@l...
> *Subject:* [xml-dev] Serialising XML Schema to HTML form and getting it
> back as XML instance
>  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


These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.