Lambda the Ultimate

inactiveTopic Dynamic Web Sites with XML, XSLT and JSP
started 8/20/2001; 8:19:35 AM - last post 8/29/2001; 6:33:16 AM
Ehud Lamm - Dynamic Web Sites with XML, XSLT and JSP  blueArrow
8/20/2001; 8:19:35 AM (reads: 2697, responses: 10)
Dynamic Web Sites with XML, XSLT and JSP
Your programmers and designers needn't be enemies just because your site uses dynamic data. One way to keep both camps happy is to use an XML based data structure delivered via Java Server Pages.

The approach recommended by this article is based on having designers use XSLT, the JSP is only used to invoke the XSLT engine.

One wonders if graphic designers would find XSLT a useful tool. Seems to me it is too complicated, requires programming skills, and can result in subtle bugs.


Posted to xml by Ehud Lamm on 8/20/01; 8:20:06 AM

jon fernquest - Re: Dynamic Web Sites with XML, XSLT and JSP  blueArrow
8/21/2001; 1:46:26 AM (reads: 2125, responses: 0)

>One wonders if graphic designers would find XSLT a useful
>tool. Seems to me it is too complicated, requires programming
>skills.........

What would a user friendly front-end to XML/XSLT look like?

Essential components:

A good graph editor like "Graphlet" (Tcl/Tk): http://www.infosun.fmi.uni-passau.de/Graphlet/

and a nice library of algorithms to draw trees, DAG's , graphs: http://www.mpi-sb.mpg.de/AGD/

The book with some of the mathematics behind the algorithms: http://www.cs.brown.edu/people/rt/gdbook.html

Ehud Lamm - Re: Dynamic Web Sites with XML, XSLT and JSP  blueArrow
8/21/2001; 1:22:17 PM (reads: 2108, responses: 1)
This is realted to XML end-user programming. I raised this issue here a couple of times.

The problem isn't the renderring, it is the demonstrational interface.

Ehud Lamm - Re: Dynamic Web Sites with XML, XSLT and JSP  blueArrow
8/21/2001; 2:56:55 PM (reads: 2092, responses: 0)
This web-based system is suposed to deal with some of the issues mentioned above. (Note: I haven't checked this out myself. Comments are welcome).

jon fernquest - Re: Dynamic Web Sites with XML, XSLT and JSP  blueArrow
8/22/2001; 2:42:54 AM (reads: 2187, responses: 0)
>This is related to XML end-user programming?..... >The problem isn't the renderring, it is the demonstrational interface.

If XML is just a "standard way to represent a tree" as James Clark says it is, then XML structure visually rendered as a tree might provide the most intuitive "demonstrational interface".

There is SQL "query by example" why not XSLT "transformation by example" ?


To quote from the interview with James Clark that you linked to:

DDJ: Did you feel like there were any major itches that you got to scratch with the specification of XML?

JC: I knew how insanely complex writing an SGML parser was. SGML is really doing something very simple. It's providing a standard way to represent a tree, and your nodes have a label with names and they can have attributes. That's all it's doing. It's not a complicated concept. Yet SGML manages to make writing something that implements it into a several-man-year project.


Well, getting back to basics, wouldn't it be possible to exploit the tree-like nature of XML in intuitive easy-to-use visual programming using trees.

XDUCE is based on tree automata and tree transducers. I've stepped the execution of tree automata by hand, but watching the visual execution of them applied to a tree would be even better. (OCAML has a tree automata/transducer library and an interface to tk.)

Ehud Lamm - Re: Dynamic Web Sites with XML, XSLT and JSP  blueArrow
8/22/2001; 8:38:51 AM (reads: 2086, responses: 0)
We are talking about the same thing, I think.

Naturally, you'd render the XML as trees, at least for some of the time.

Than the user has to show the transformation he wants (that's the demonstrational interface which may be similar to QBE). The crucial part is understanding what the user meant by his transformation, this has all the same difficulties you have with things like MS Word autotext etc.

Alex Moffat - Re: Dynamic Web Sites with XML, XSLT and JSP  blueArrow
8/27/2001; 10:28:17 AM (reads: 2072, responses: 1)
I think a lot depends (obviously) on the graphic designers you're working with. The goal is to have everyone working on the parts they are best suited for, so the programmers don't have to fiddle with font settings in HTML pages and the designers don't have to learn a "programming language" if they don't want to.

For the project I'm currently working on we decided to go with JSP and custom tag libraries as we hoped that this would let us produce a very verbose (i.e. many specific tags instead of a few general tags that take many parameters) language that the designers could use as if it were HTML. This did not work for several reasons

1. The actual development environment for using custom tags is still pretty brutal with the potential to have to redploy to test JSP changes etc.

2. No drag and drop wysiwyg editor (this is probably coupled with issue 3)

3. Designers who didn't want to/were unable to understand the way a JSP worked.

I'm coming round to the idea of using xslt and css. Let the programmers deal with transforming from the internal formats to an abstract document format. The programmers, together with the designers, can produce transforms from the abstract document format to one or more standard HTML structures which include as little formatting etc. as possible. The designers can then use css to apply layout and formatting.

This has the pragmatic advantage that the designers already know (or can be forced to learn :) css as it is a designer sort of thing. If they want to "advance" to working on the xslt as well then that's fine but hopefully the transforms will not need a lot of changes.

A graphical system for general tree to tree transforms that is usable by folks who can't get their heads round JSP custom tags (or another tag system) is IMHO a bit in the future.

Ehud Lamm - Re: Dynamic Web Sites with XML, XSLT and JSP  blueArrow
8/28/2001; 2:55:12 AM (reads: 2126, responses: 0)
A graphical system for general tree to tree transforms that is usable by folks who can't get their heads round JSP custom tags (or another tag system) is IMHO a bit in the future.

Just the reason to think about building such a thing. I thin it was Jobs (or was it Alan Kay?) that said The best way to predict the future is to invent it...

In fact what I have in mind is a bit more ambitious because I am thinking about all kinds of transformations, not just the display-oriented subset.

Essentially, I want as user enabled XML application framework.

Alex Moffat - Re: Dynamic Web Sites with XML, XSLT and JSP  blueArrow
8/28/2001; 11:56:06 AM (reads: 2047, responses: 1)
Certainly tree to tree transforms are possible graphically. This is, basically, what data mapping programs have to do when moving data from one COBOL record layout to another. So you can drag, or draw, from the "source" tree to the "target" tree and have the transforms generated successfully (well sort of). In fact you can do "forest" to "forest" mappings deriving the intermediate sorts and merges using the same techniques. Making something similar that could generate xslt from the mapping spec would be pretty neat and looks doable. In fact it would be a nice end run round some of the data mapping tools for use in single transaction or small volume situations.

I was thinking more that producing something that lets a person drag an xml element/attribute from a source structure onto a blank page, position it where they want, and then generate the necessary xslt to transform from the xml to the html would be hard.

However, the more I think about it the more reasonable it seems. There are already (viz wysiwyg html editors) programs that let you manipulate html visually, so they go from the visual manipulations to the html tree.

Re. user enabled XML application framework. What sort of primitives where you thinking of providing? I've been looking at things from a more functional viewpoint lately and it seems that selection/construction of the correct language to let the user express what they want is crucial to the success of this sort of thing?

Ehud Lamm - Re: Dynamic Web Sites with XML, XSLT and JSP  blueArrow
8/29/2001; 5:44:21 AM (reads: 2115, responses: 0)
I was thinking more that producing something that lets a person drag an xml element/attribute from a source structure onto a blank page, position it where they want, and then generate the necessary xslt to transform from the xml to the html would be hard.

I was thinking along these line too.


user enabled XML application framework. What sort of primitives where you thinking of providing?

Think of something like Zope. We (mainly) try to enable building of web based applications, so we need to think about client side/server side. We need to support modules that are keys to specific data formats (e.g., RSS) and so on.

Basically the idea is to have something like VB, but where the components can be distributed, and the basic toolikt suports XML data.

The system should also embody some model like MVC, or the two-stylesheet approach, to guide and organise development.

These ideas need, I am sure, much more careful elaboration.


I've been looking at things from a more functional viewpoint lately and it seems that selection/construction of the correct language to let the user express what they want is crucial to the success of this sort of thing?

Obviously. That's why we are a PL related weblog...

One of the things that started me on this path, however, was trying to think of an end-uder enabled system, where scripting (damn the term) can be done using a VHLL, a NLP component, or using some other form of end-user programming.

Mainly I was thinking about an e-learning env. where instructional designers can play with new ideas.

Alex Moffat - Re: Dynamic Web Sites with XML, XSLT and JSP  blueArrow
8/29/2001; 6:33:16 AM (reads: 2046, responses: 0)
Very interesting links, thanks.