[XSL-LIST Mailing List Archive Home]
[Reply To This Message]
RE: API for XSL
Back to your original question....
Does anybody of you knows a server side system allowing to pass
parameters for XSLT template through a URL. I already have this
capacity on the client side and would like to get it for browser not
supporting XSLT. Any suggestions?
In Python, there is 4Suite. http://www.4Suite.org.
In Java, there is also Cocoon. But you have been disparaging Cocoon
lately on this list, for reasons I do not feel competent to
criticize, partly since I do not know how current your understanding
of it is. (It could well be more current than my own; but hey, even
the slightly-older version I have works for my purposes. Yet,
depending on when you last checked, you might want to take a second
look at it.)
In any case, the feature you describe -- intercepting an incoming
request, decomposing it (with wildcard matching and/or regular
expressions) and dispatching its components to specify
subdirectories, files, stylesheets and/or runtime parameters for the
XSLT engine, or simply accepting the URI "?" syntax and passing
parameters along -- is common among the more mature server-side
XML/XSLT environments. I know both toolkits mentioned above have it,
and I'd expect others to have it as well. Each toolkit does it
somewhat differently, of course, so YMMV.
At 07:16 PM 3/7/2006, you wrote:
This sounds very interesting indeed, thanks for the long explanation!
Can you give me a pointer where I can read up more about the concepts
and some key implementation details?
I am writing them. For the moment I just have the API documentation and even
though I still need to write a better document.
But overall, the entire system uses XSLT as a model to model transformation
language. Uses XSLT parameters to inject the context in the generated code
both declarative and imperative.
You can get more info about generative programming here:
I intent to present this implementation at the generative programming
conference and at OOOPSLA. OOPSLA because I also designed an RDF and xlink
derived language to encode objects. In this language, objects are associated
to types and types to representations. Hence, they have two level of
reflectivity, one stating what kind of properties and the other one stating
how these types can be represented. The objects tell more about who they are
and what you can do with them. This last concept is totally new and very
Overall, I discovered that XSLT is marvelous language to perform model to
model transformation. For example, I design my object models with Poseidon.
The latter exports the model into XMI, I transform this model into my
language type, add the second level of reflectivity with an other XSLT
stylesheet and all my components (some of them you saw in the previous
message) like treeView, tabView, contextView, tableView, etc.. are using
XSLT to transform object instances into rendering and interactive objects.
So, we have here a model to model value chain using XSLT as a transformation
engine. And finally, features are set with XSLT parameters. Thus I can adapt
components to different contexts and generate different code. Took a long
time, a lot of trial and errors and extreme thinking sessions, but it is now
more stable and proved useful in concrete applications. The best part of it
is that in this architecture, servers are used for services and the clients
perform all the previously mentioned operations. It leverages, the power
client have. But the best part was to discover how good and efficient XSLT
can be for model driven architectures as mentioned by CORBA and still in the
limbs. The trick though is to encode your objects into an xml based language
and there you go: transform them into, java, c#, python, perl, EcmaScript,
XHTML, etc. etc. The strength of XSLT is to be able to transform either into
text, HTML or XML. Because most of modern rendering tools are now or will in
a near future support markup languages like XUL, XAML, XHTML, SVG, etc.
Bottom line, model driven architecture are really possible when using XSLT.
Moreover, I discovered that if you transform a domain model (strictly
semantic objects and no rendering stuff) into a rendering model like for
instance XHTML (yes I know, but XHTML is also interpreted as a hierarchy of
rendering objects by the browsers) then you can assemble in just in time the
code written, for instance, in ECMAScript. As long as the model to model is
targeting the same end structure, you can reuse the same code. For instance,
RSS can be transformed into a hierarchy of XHTML <div> to create a treeView
like structure. A different language like topic maps can also be transformed
into the same target structure. IN both cases, if you assemble just in time
the behavior you treat the XSLT as an object constructor and reuse the same
ECMAScript code. You can then have several model to model (as RSS->XHTML
<DIVS> or topicMap -> XHTML <DIVS>) and reuse the very same ECMASCript. Very
powerful and lead to more reuse than classical object oriented methods based
on closed and static methods.
Anyway, I write all this in several article because there so much to say
that I will need several articles to fully cover the whole set of XSLT based
tricks I developed in these 4 years of silence :-) As you know I stopped
writing in XML.com or writing books to concentrate fully on this research
Didier PH Martin
Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc. http://www.mulberrytech.com
17 West Jefferson Street Direct Phone: 301/315-9635
Suite 207 Phone: 301/315-9631
Rockville, MD 20850 Fax: 301/315-8285
Mulberry Technologies: A Consultancy Specializing in SGML and XML
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format