Re: Doubts regarding XSL and DOM

Subject: Re: Doubts regarding XSL and DOM
From: keshlam@xxxxxxxxxx
Date: Mon, 26 Oct 1998 13:14:17 -0500
>DOUBT 1 :- I was wondering whether I could do all that with XSL patterns
>that I could achieve with DOM?

XSL is a higher-level approach; it greatly simplifies the most common kinds
of document transformation, but is specific to those operations. By
contrast, the DOM is just a datastructure; you provide your own program to
manipulate it and that program can be as complicated as you like... but you
have to code all that logic manually.

Think of XSL as a tool rather than a programming language. That sums up its
strengths and limitations in a single word. Or, if you prefer, think of a
high-level language versus assembler; there are things you can do in
assembler that Java, for example, has chosen not to support, but Java's a
lot easier to worth with when it does fit the problem.

>DOUBT 2:-  Does the XSL pattern mechanism give us the the type of freedom
of
>tree traversal that  the DOM interfaces give us?

Level 1 of the DOM has very limited traversal mechanisms, actually. You can
explicitly walk the tree (parent, next/previous sibling, first/last child).
Or you can ask for a list of all the Elements in a subtree that have a
particular tag name. Level 2 may add some richer query mechanisms, but I
don't think anyone knows yet exactly what they'll be. They may be less
powerful than XSL's patterns, more powerful, the same or different.

>DOUBT 3 :- <...> does XSL take
>care of all the types of traversals that DOM caters to?

I'm not entirely sure why this is a concern... The question should be
whether XSL supports all the kinds of traversal that XSL itself requires,
unless I'm missing something.

______________________________________
Joe Kesselman  / IBM Research
Unless stated otherwise, all opinions are solely those of the author.



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread