[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: First experiences with XSL
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! 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
|