[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: First experiences with XSL

  • From: "Harmison,Mark" <Mark_Harmison@w...>
  • To: xml-dev@i...
  • Date: Fri, 30 Jan 1998 14:15:19 PST

mark harmison
Michael Kay wrote:

> I've downloaded MSXSL and used it to generate HTML for a couple of document
> types, successfully but with a certain amount of frustration caused by (a)
> lack of diagnostics when I got things wrong, and (b) limited functionality.
>
> I've now implemented the same thing without XSL: I wrote an MSXML
> application in Java that does a recursive walk down the document tree and
>calls a registered "handler" class to process each element type. I added a
> number of helper methods such as isFirstOfType() to allow the handlers to
> get information about their context more easily.
>
...
>Any XSL enthusiasts want to prove me wrong?
--------------------
These are interesting points and should spark some good discussion.

I have had a long-standing interest in a notion of "compiled" 
 stylesheets.  Compiled stylesheets would be generated from interactive 
 tools, similar to today's stylesheet editors.  The editor would output 
 formatting source which could be compiled with a standard compiler 
 (such as Java or C++).  The rendering engine would then simply call 
 the compiled functions for each element.  Both speed and richness in 
 the run-time environment would be improved over run-time stylesheet 
 interpretation.

However, the stylesheet editor must have a way of storing the 
 designer's original intend.  XSL provides a good declarative syntax 
 and metaphor for doing this.  Non-programmers can understand "rules", 
 "patterns", "actions", and "flow objects" pretty well.  A stylesheet 
 editor can read and write XSL easily and reliably.  Because XSL is 
 declarative, it is much easier for a program to read it than a 
 procedural specification of formatting would be.

Here's a suggestion:  If you want faster formatting than a given XSL 
 processor can give you, or you want access to the system in a way not 
 possible through the declarative language, you write a program which 
 turns a declarative XSL stylesheet into a compilable program which can 
 then be extended using the compiled language.  The best of both worlds.

Having said all that, I've been doing stylesheet junk for about 5 years 
 and used a bunch of different system and performance of the stylesheet 
 engine is not usually the problem.  Access and extensibility are more 
 commonly the trouble.  Where a good escape to native code or a good 
 "scripting language" mechanism has existed, these have been plenty.

I am both a programmer and sometime-stylesheet person.  I can tell for 
 much experience that programmers get really bored doing stylesheet 
 type programming (just like we got bored writing reports and forms).  
 So, we invent tools to let "lesser mortals" do that work ;-), hence 
 stylesheet languages.  If you really want to write stylesheets in 
 Java, have fun, but I bet the fun won't last more than a few weeks.

Mark Harmison
Xerox Corporation
Mark_Harmison@w...

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i...
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@i... the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@i... the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@i...)


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.