473,668 Members | 2,377 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Transformation between XML instance data and HTML form

A few weeks ago I have the idea of converting XML instance data to a
HTML form, using tags as the label and the resulting form can be used
to edit the XML data. So I started to play around with it, and have
some prelimary proof of concept stuff working. Then I started to
search around on the web for similar works. There seem to be quite a
few people with the same idea. The following is an example. However as
far as I can tell, nobody really takes it to the fullest conclusion.
And the more I work on the project, I can see more and more
interesting potential. I would like to get some comment before I go
too far with my project.

My work is on this site, bear in mind that a lot of features are
missing. For example I am working on insert and delete now.

http://www.datamech.com/XMLForm/

And for a completely bare bone approach, look at this
XML file from IE6 (would not work with mozilla.)

http://www.datamech.com/XMLForm/test.xml

Ed Lai

wh************@ yahoo.com (Frank Einstein) wrote in message news:<5c******* *************** ****@posting.go ogle.com>...
Looking for a tool that can edit an XML file in a browser. The basic
requirement is that the XML file is rendered as an HTML form with
editable fields (including add/delete, preferably in accordance with
with the document's XSD/DTD or other schema definition). I don't mind
the actual form of this tool - could be implemented as a JSP/Servlet,
ASP component, or browser plug-in for local or remote XML file access.
Alternatively, it doesn't have to be a web browser or HTML as the GUI,
but it does need to be form-based (as opposed to element-tree based
like most simple XML editors).

My initial feeling that something like this would be ubiquitous and
freely available seems to have hit up against a different reality
after a day of looking. Perhaps tool writers are waiting for
standards to progress in this area (XForm ?). Perhaps I'm looking in
the wrong places ?

As an example of what I'm looking for, the closest thing I've found is
described in this series of articles :
http://www.xmlfiles.com/articles/mic...ml/default.asp (this
example uses the Microsoft.XMLDO M asp component)

What's missing here is that the generated HTML form simply reflects
the current XML document instance, and does not allow for
modifications allowable by the XSD/DTD unless they are currently in
the XML document instance. For example, it doesn't give a button to
add an additional element, if this is allowed by the maxOccurrence in
the XSD.

So what I want does this:
- open user-specified XML doc
- (optionally) open XSLT doc for custom GUI/form rendering
- open XSD or DTD doc
- render GUI form containing XML data in accordance with optional XSTL
doc
- allow use of HTML/_javascript(or other) controls to change/add/delete
elements/paramenters/data etc., within the confines of the XSD/DTD
- transform form data back to XML format, valid per XSD/DTD, and save
to disk

I've also briefly looked at the Cocoon XMLForms stuff (and related),
but this seems too comprehensive for what I want... I don't want XML
binding to Java objects/beans, I simply want something that will
input/output back to/from the original XML file. Maybe there is a
tool/sample/example within the Cocoon distribution that does this, but
I haven't actually looked yet.

Any pointers welcome.

...

Jul 20 '05 #1
7 2921
da***********@y ahoo.com (Ed Lai) writes:
A few weeks ago I have the idea of converting XML instance data to a
HTML form, using tags as the label and the resulting form can be used
to edit the XML data. So I started to play around with it, and have
some prelimary proof of concept stuff working. Then I started to
search around on the web for similar works.
...


Hey, I find this very interesting. I had the same idea, but just looked at
the web to find any existing tool and didn't try to implement it myself.

Anyway, a couple of ideas :
- did you look at XForms ? I guess it may concern
HTML completed form -> XML instance,
- In my mind, your "form generator" could by made with a XSL transformation
generating the HTML form from any XML instance document.
The really difficult job would be to generalize this to HTML form derivated
from DTD or XML-Schema... Of course some tools exist (XML structured editors),
but I couldn't find one working over the Web (in a thin client architecture)

Bye,

Robert Rivière
Jul 20 '05 #2
The most frequent suggetion I got was that I should look into XForms. I
have read some introduction but not in detail. I guess I would be using
it in future. Now I would like to have something that at least in its
minimum configuration can run in as many machine as possible. Using
XForms now require a special browser or plugin. I often use the computer
in a public library and of course you cannot install your own software
there. This is my guideline, you should be able to use it from a public
library computer. So XForms is for future work, not now, and of course
that gives me some time to really learn XForms.

As for using XSLT for the transformation, it is indeed possible and I
have a shorten version of it, when I suggested looking at
http://www.datamech.com/XMLForm/test.xml, that uses XSLT to transform
the test.xml file to HTML form. Although I agree it would be much more
difficult when we have to take account of XSD/DTD.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 20 '05 #3
Ed Lai <an*******@devd ex.com> writes:
[about XForms]
it in future. Now I would like to have something that at least in its
minimum configuration can run in as many machine as possible. Using
XForms now require a special browser or plugin.


AFAIK, the Chiba project implements on server-side XForms managing for a thin-client
pure HTML navigator.

I didn't look in deep details, though

Robert
Jul 20 '05 #4
A new version that includes insertion and deletion is now available. It
can be found in the same location.

http://www.datamech.com/XMLForm/


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 20 '05 #5
Ed Lai <an*******@devd ex.com> writes:
A new version that includes insertion and deletion is now available. It
can be found in the same location.

http://www.datamech.com/XMLForm/


Hi,

very interesting work. Nice job. I think it gives a good illustration of global concepts around XML.

However in "Modify the Input Fields of the Form", you say :
"Note that with schema information, it is possible to generate these non-text field automatically".

Yes, definitively. But in my mind *this* is the hot-topic. Having a form generator
able to produce radio-buttons or drop-down menus from what is in the schema.
Would you have any plan about this ?

Robert
Jul 20 '05 #6
Ed Lai <an*******@devd ex.com> writes:
A new version that includes insertion and deletion is now available. It can be found in the same location.

http://www.datamech.com/XMLForm/

Hi, very interesting work. Nice job. I think it gives a good illustration of global concepts around XML.
However in "Modify the Input Fields of the Form", you say :
"Note that with schema information, it is possible to generate these non-text field automatically".
Yes, definitively. But in my mind *this* is the hot-topic. Having a form generatorable to produce radio-buttons or drop-down menus from what is in the schema.Would you have any plan about this ? Robert


Yes, it is definitely under the plan, although I think the choice
information is going to be collected from the data.

BTW, for those who just drop into this thread and do not know what is
going on, XMLForm is a web based XML editor using HTML Form. It is still
under development, the first release was in Jan which only allows
modifying the XML data. I just release a version that allows adding and
removing elements from the XML data. There will be more features in
future release. Check it out in http://www.datamech.com/XMLForm/

Ed
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 20 '05 #7
I have posted a new version of the editor that allows you to change a
text field to a select list or radio buttons, the choices are collected
from the document.

For Safari you can only make the select list. The radio buttons would
not work right.

As usual, it is located at

http://www.datamech.com/XMLForm/

Ed

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 20 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2700
by: Sergio del Amo | last post by:
Hi, I use the xslt functions provided by php. I am running in my computer the package xampp(www.apachefriends.org) which includes php/apache/mysql .. In this package the php includes the sablotron extension responsible for the xslt functions. The problem i have is that the obtained transformation is not the waited one. I try to proccess the same XML file with XSL file with a program called XMLspy and i obtained the desire and waited...
12
3219
by: gipsy boy | last post by:
Hello, I have sort of a big problem. I would really appreciate any help you could give me. I made a web service in C++ that throws XML to the client (browser). But, the XSLT transormation (xml->html) doen't happen! I have XSLT files for this, they work, I mean when I put the output of the app as an XML file on some server, and make it use the XSLT files to transform into HTML, it works, I get a HTML page.
4
2436
by: Fredrik Henricsson | last post by:
Hey, I'm building an ontology in Protégé and I want to transform parts of it (e.g. the instances) to HTML with XSL. When I was transforming another file with 'simple' XML-tags like <author> before, I got it working, but the OWL-file is formatted differently and I don't know how to access the elements. I'll post the .owl file below, but this is basically what I want to get from the file (the course name): <Course...
9
1511
by: Bucco | last post by:
How effective is Javascript in transforming XML into XHTML? I'm wanting to use the XML file to store data that will then be transformed into the XHTML file for displaying of the data. I want to keep it real simple and all text so that it is easily transportable. Thanks in advance. :) SA
2
2015
by: Stuart | last post by:
I am a bit of a newbie to C# and would like help with the following. I am bringing in a dataset and transforming that dataset using an XSL style sheet to generate text. This text does in fact contains SQL statements (DBCC commands etc) which I want to capture and run on a SQL Server instance. At the moment I can do this by writing the result of the transformation to file and re-loading it, but would like to skip out the file and write...
1
2063
by: daniele74 | last post by:
Hy, I want ask you this question. I have two schema file schema1.xsd and schema2.xsd. then I have a stylesheet transformation style2.xsl that show in a browser an xml file that has schema2.xml as schema. moreover I have an xslt tranformation that map schema1.xsd in schema2.xsd (schema1TOschema2.xslt). so the question is: it is possible to use style2.xsl to view xml file that has schema1 as schema?? with instractions similar to this...
7
7866
by: Zzzbla | last post by:
Hi all, anyone has a live example of loading an xml file from a server, an xslt file from the server, then transforming the xml using the xslt and outputing the results (preferably with appendChild)? I'm trying to write a function to do just that (given url to xml, url to xslt and elementid). Works a charm on IE. Can't get it to work with Firefox.
2
2019
by: Pathik | last post by:
Hi All, I am New to xml. Currently I am trying to transform one xml file to another file using xslt my xml file is as follows: <?xml version="1.0" encoding="UTF-8" ?> <?xml-stylesheet type="text/xml" href="test.xsl" version="2.0"?> <Data>
2
1667
by: li72 | last post by:
Hi. everyone I am new to xslt and Xforms technologies. I am trying to write a very simple xslt stylesheet to transform a very simple xml doc into Xforms doc. (Hello world example) here are my xml doc and xslt stylesheet could plz tell me what wrong with my stylesheet. Remark: X-smiles is used as web browser and it returns an error message when the page is called. the page is called as: http://localhost:8080/mydoc.xml both xml do and xslt...
0
8459
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8374
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8791
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8575
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8653
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6206
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4373
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2018
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1783
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.