OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   Procedural vs Declarative XML transformation approaches

[ Lists Home | Date Index | Thread Index ]
  • From: Mike.Champion@SoftwareAG-USA.com
  • To: xml-dev@lists.xml.org
  • Date: Sat, 04 Nov 2000 12:12:26 -0500

Title: Procedural vs Declarative XML transformation approaches

I don't want to open too big a can of worms, but I'd appreciate any pointers to background information that might help me understand the pros and cons, appropriate use cases, etc. for the alternative approaches to transforming XML (either to a display format or another XML format).  There exist  non-procedural languages such as XSLT to do this by "declaring" what is to be done, and there exist  procedural approaches -- such as  DOM+Javascript, OmniMark, XMLPerl, PHP (?), and perhaps XSLScript -- that  let you write a script to just *do* what needs to be done.

I'm not interested in a rehash of what's right and wrong with XSLT itself, but a more abstract discussion of when and why one would take one approach or the other. I can think of a couple of arguments.  First, In the world of query languages, it's clear to me that procedural approaches don't scale well -- you want an optimizer to figure out the best way to "just do it" given all it knows about the data, indexes, storage structures, etc.  Can this argument plausibly be applied to transformation as well?   It doesn't seem like it to me, since transformations are typically defined on a real chunk of XML, not an abstract set of criteria.

Second, I believe it is an article of faith that the archetypical *users* of Web technology (webmasters, site designers, page authors) are more comfortable with concepts that have the look and feel of declarative "stylesheets" than of those that have the look and feel of "programs".  Right?    Does this concept scale to XML->XML transformation as well as display? Is this still true now that Javascript (oops, sorry, ECMA 262) and Visual Basic, PowerBuilder, etc. have been pervasive for at least 5 years in the world of web site builders?

Also, I guess I should ask the meta-question -- is the declarative-procedural distinction still meaningful, or am I just stuck in the world of 1980's AI when this was a hot topic? (I guess an even nastier metaquestion is whether this also applies to validation as well as transformation ... I've heard a number of assertions that in the "real world", most XML users just write procedural code to validate content models, data types, and business rules all at once, and are not exactly waiting with bated breath for any of the declarative schema languages ... but I digress).

My suspicion is that the different approaches both are appropriate to certain audiences under certain conditions -- I want to understand those conditions better, not re-start any religious wars.  Thanks in advance for any help.


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS