Loading ...
Sorry, an error occurred while loading the content.

Generic Newbie XForms Question

Expand Messages
  • John McGowan
    I ve yet to do anything with XForms or FormsPlayer. But I think it might help me with something i m working on. I m looking for a generic solution to handle
    Message 1 of 2 , Jan 3, 2006
    • 0 Attachment
      I've yet to do anything with XForms or FormsPlayer. But I think it
      might help me with something i'm working on.

      I'm looking for a generic solution to handle the editing of XML data
      that conforms to an XML Schema. (repeating and optional elements,
      optional attributes, etc...)

      From what I can tell, XForms may be a good way for me to go, but I
      think i'm going to need a software package that converts an XML Schema
      to an XForm, or some smart XForm implementation that understands XMLSchemas.

      I'm a little confused about which direction to go here. Is FormsPlayer
      something that would help me? Do I need to look at something else?

      Thanks,
      John
    • Mark Birbeck
      Hi John, XForms is not currently designed to take advantage of schema information beyond validation and using the datatypes to render different controls. This
      Message 2 of 2 , Jan 4, 2006
      • 0 Attachment
        Hi John,

        XForms is not currently designed to take advantage of schema information
        beyond validation and using the datatypes to render different controls. This
        is because many XForms features such as relevance are *more* powerful than
        that which can be achieved in a schema. The @relevant xf:bind attribute, for
        example, can be used to enable and disable parts of instance data based on a
        full XPath expression, so can be used to express conditions that XML Schema
        cannot.

        So whilst there is no run-time processing of rules in a schema, there are
        still ways that you can make use of an XML Schema. One technique we have
        used to obtain labels, hints (tooltips) and help text is to actually load
        the schema into another instance and then dip in to it to get data for the
        form. (Of course, if the schema uses xsd:import or xsd:include then you
        won't have access to the referenced schemas.)

        Another technique--and the one you sound like you are most interested in--is
        to use a tool to generate a basic form from a schema, and then tweak the
        form to suit your needs. Eclipse and XFormation support this kind of
        processing:

        http://www.alphaworks.ibm.com/tech/xfg
        http://www.xformation.com/

        If you do use this technique then I suggest that you run the output through
        an XSLT stylesheet to obtain your finished form, and then rather than
        editing the form directly you edit the XSLT. That way you can always
        regenerate your finished form if your schema changes...but if you have hand
        edited you'll be pretty annoyed!

        Regards,

        Mark


        Mark Birbeck
        CEO
        x-port.net Ltd.

        e: Mark.Birbeck@...
        t: +44 (0) 20 7689 9232
        w: http://www.formsPlayer.com/

        Download our XForms processor from
        http://www.formsPlayer.com/

        > -----Original Message-----
        > From: formsPlayer@yahoogroups.com
        > [mailto:formsPlayer@yahoogroups.com] On Behalf Of John McGowan
        > Sent: 03 January 2006 21:26
        > To: formsPlayer
        > Subject: [formsPlayer] Generic Newbie XForms Question
        >
        > I've yet to do anything with XForms or FormsPlayer. But I
        > think it might help me with something i'm working on.
        >
        > I'm looking for a generic solution to handle the editing of
        > XML data that conforms to an XML Schema. (repeating and
        > optional elements, optional attributes, etc...)
        >
        > From what I can tell, XForms may be a good way for me to go,
        > but I think i'm going to need a software package that
        > converts an XML Schema to an XForm, or some smart XForm
        > implementation that understands XMLSchemas.
        >
        > I'm a little confused about which direction to go here. Is
        > FormsPlayer something that would help me? Do I need to look
        > at something else?
        >
        > Thanks,
        > John
        >
        >
        >
        > Yahoo! Groups Links
        >
        >
        >
        >
        >
        >
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.