I tried searching Google, but didn't find very much on the topic of using XForms to edit arbitrary XML documents. It seems like XForms would be a great way to write an XML editor if your XForm could make sense of XMLSchema. I am currently using JAXE, a standalone rich client, to edit XML. If your XML document has an associated XML Schema, JAXE won't let you break the rules of the schema as you are creating your XML document. It is also somewhat graphical, so non technical users can write XML documents (still needs work though).
I have currently edited the bookcast application to edit an XML document, but that example has the schema heavily embedded both in the model and the UI (for example, there are two instances that duplicate the definition of a book in view.xhtml; book is already defined in the bookcast xmlschema-- this is a maintenance headache for schemas that are still a moving target). So for each variation on the XML doc I have to write a new XForm, and each time the schema gets updated I need to revisit all the forms. Seems like I might be better off writing a form that can understand XMLSchemas. Before I start going down that path, I was wondering if anyone has any pointers to an application like this? Or any work regarding increasing the integration betweens XForms and a user supplied XMLSchema? |
Administrator
|
On Mon, Jul 14, 2008 at 2:52 PM, fitek <[hidden email]> wrote:
> I tried searching Google, but didn't find very much on the topic of using > XForms to edit arbitrary XML documents. It seems like XForms would be a > great way to write an XML editor if your XForm could make sense of > XMLSchema. I am currently using JAXE, a standalone rich client, to edit > XML. If your XML document has an associated XML Schema, JAXE won't let you > break the rules of the schema as you are creating your XML document. It is > also somewhat graphical, so non technical users can write XML documents > (still needs work though). Creating a completely generic, XML Schema-aware editor is not a simple task, to say the least. And the result you get might not be totally appropriate to a specific type of document. The size of the effort combined with the suboptimal result you can expect maybe explains why this type of tools are not very common. More frequently you will see people build interfaces that allow you to edit very specific document (e.g. Bookcast example) or a class of similar documents. I hope this helps, Alex -- Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise Orbeon's Blog: http://www.orbeon.com/blog/ Personal Blog: http://avernet.blogspot.com/ Twitter - http://twitter.com/avernet -- 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 OW2 mailing lists service home page: http://www.ow2.org/wws |
I don't think a generic application would be suitable out of the box for usage, but it would be a good starting point. This was my impression of JAXE-- it's a good starting point, but needs plenty of customization. However, I do not want to start editing JAXE because it is a rich client Swing based application and my work requires that the application run inside a web browser without Java installed. I have not found any JAXE like application that runs inside the browser. It seems like XForms would be a natural way to create such an application if it could more tightly integrated with an XMLSchema but...
I am just worried that with the book cast style application, the structure of the data has to be duplicated in multiple instances and also appears in multiple places within the display code. The UI is heavily dependent on the schema. I may not understand Orbeon's features well, but I'm not sure why I need to bind an element to xs:date type when I have already defined this in the XMLSchema. I had to make a relatively minor change to the schema a couple of days ago and I had to overhaul the whole xhtml as a result. Not fun. IMO this sort of mess is why I am using XForms to begin with; so I can focus on the data and user experience rather than reinventing the wheel with JavaScript. Yet here I am again, defining in my XMLSchema that a particular complex type has two children, a string and a date; and I have to code this into the instance as well; and then use xforms:bind to enforce the datatypes too, in yet another location in my xhtml. I have additional work to do too: I have to leave enough documentation for the next person working on the document about how they need to update the schema and then the xhtml in such and such a location to make it all work. I don't want to sound like I'm just complaining as I think Orbeon is fantastic, far better than the other XForms applications out there. I coded most of my company's forms engine 3 years ago and I understand how difficult it is, and my effort was far messier and less capable than what Orbeon has created. -Peter
|
Administrator
|
Thanks for the kind comments.
XForms itself is just a building block for the solution you are looking for. The rest must be done on top of XForms. You could start with an XSLT transform which would take a schema and produce an entire form from that. The next step would be to integrate that into Form Builder so that you can pick and choose parts of the schema to build a custom editor. All this would be fantastic, but a lot of work. It would probably take weeks of development if not more to get there. This doesn't mean that this couldn't be done incrementally. For example, a first feature could consist in allowing the user to pick a complex type in a schema, and have Form Builder automatically propose a data model and controls for that. (BTW you don't need to bind xs:date if you already have an xs:date type in your schema.) -Erik On Jul 18, 2008, at 11:41 AM, fitek wrote: > > I don't think a generic application would be suitable out of the box > for > usage, but it would be a good starting point. This was my > impression of > JAXE-- it's a good starting point, but needs plenty of customization. > However, I do not want to start editing JAXE because it is a rich > client > Swing based application and my work requires that the application > run inside > a web browser without Java installed. I have not found any JAXE like > application that runs inside the browser. It seems like XForms > would be a > natural way to create such an application if it could more tightly > integrated with an XMLSchema but... > > I am just worried that with the book cast style application, the > structure > of the data has to be duplicated in multiple instances and also > appears in > multiple places within the display code. The UI is heavily > dependent on the > schema. I may not understand Orbeon's features well, but I'm not > sure why I > need to bind an element to xs:date type when I have already defined > this in > the XMLSchema. I had to make a relatively minor change to the > schema a > couple of days ago and I had to overhaul the whole xhtml as a > result. Not > fun. > > IMO this sort of mess is why I am using XForms to begin with; so I > can focus > on the data and user experience rather than reinventing the wheel with > JavaScript. Yet here I am again, defining in my XMLSchema that a > particular > complex type has two children, a string and a date; and I have to > code this > into the instance as well; and then use xforms:bind to enforce the > datatypes > too, in yet another location in my xhtml. I have additional work to > do too: > I have to leave enough documentation for the next person working on > the > document about how they need to update the schema and then the xhtml > in such > and such a location to make it all work. > > I don't want to sound like I'm just complaining as I think Orbeon is > fantastic, far better than the other XForms applications out there. > I coded > most of my company's forms engine 3 years ago and I understand how > difficult > it is, and my effort was far messier and less capable than what > Orbeon has > created. > > -Peter > > > Alessandro Vernet wrote: >> >> Creating a completely generic, XML Schema-aware editor is not a >> simple >> task, to say the least. And the result you get might not be totally >> appropriate to a specific type of document. The size of the effort >> combined with the suboptimal result you can expect maybe explains why >> this type of tools are not very common. More frequently you will see >> people build interfaces that allow you to edit very specific >> document >> (e.g. Bookcast example) or a class of similar documents. I hope this >> helps, >> >> Alex >> -- >> Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise >> Orbeon's Blog: http://www.orbeon.com/blog/ >> Personal Blog: http://avernet.blogspot.com/ >> Twitter - http://twitter.com/avernet >> >> >> -- >> 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 >> OW2 mailing lists service home page: http://www.ow2.org/wws >> >> >> ----- >> Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise >> http://www.orbeon.com/ >> >> > > -- > View this message in context: http://www.nabble.com/Xforms---XMLSchema---using-xforms-as-a-generic-XML-editor-tp18454034p18535501.html > Sent from the ObjectWeb OPS - Users mailing list archive at > Nabble.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 > OW2 mailing lists service home page: http://www.ow2.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 OW2 mailing lists service home page: http://www.ow2.org/wws |
Free forum by Nabble | Edit this page |