October 29, 2004

XSLT vs XForms

Don wrote:

>
> Nick
>
> I've been searching around like a dog after a lost bone for something to help explain to me the difference between XSLT and XForms. Why do both exist, and why would someone use one over the other. I have come up fairly dry on this topic, so I wondered if you might have seen some such comparison or explanation somewhere.
>
> Thanks for any input.
>
> Don

Don --

I don't know if anyone has ever talked about this, but I'll try to answer your question here:

The difference in XSLT and XForms is in what they're for. Extensible Stylesheet Language for Transformations (XSLT) is a language specifically designed to take XML of one form or structure and convert it into XML of another form or structure. (You can also use it to convert to and from non-XML, but that's another conversation.) There is a specific "vocabularly" for XSLT, and each element and attribute is focused on transforming a source document into a target document. XSLT deals with all kinds of information and doesn't really try to draw any meaning from it; it simply converts the source into the target.

XForms, on the other hand, is meant to provide an easy way to take information that starts out not as XML, but as data in a user's head. Think of it as HTML forms on steroids. It has a specific vocabulary, meant to be interpreted by an XForms client such as a browser. The client acts on the XForms elements directly, using them to render in some way form entry fields such as text boxes and pulldown menus. It then gathers the individual pieces of information and (in most cases) turns them into XML.

I've personally never seen too much of a collision between the two technologies, but I suppose I can see it if you look at them both as ways of taking information in one form and converting it to some other form. In reality, though, they serve very different purposes. XSLT is an almost abstract language that works directly on the data, where XForms is a concrete language acted upon by a client to help facilitate the actual collection of data.

I hope that helps...

---- Nick

Technorati tags: XSLT | XForms |

src="http://feeds.feedburner.com/~s/ChaosMagnet?i=http://www.chaosmagnet.com/blog/archives/000487.html" type="text/javascript" charset="utf-8">
Posted by roadnick at October 29, 2004 10:20 PM | TrackBack

Comments

Post a comment









Remember personal info?