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

Re: Should I use XSLT or DOM

Subject: Re: Should I use XSLT or DOM
From: keshlam@xxxxxxxxxx
Date: Thu, 15 Jun 2000 12:04:59 -0400
major use xslt
>The destination tree will be
>different from the source tree with element
>and attribute values from the source tree
>becoming element/attribute values of a
>totally different tree structure.

No problem. XSLT allows you to completely reorganize the data; that's one
of its major advantages over the relatively simple CSS model.

Your example's a bit too fuzzy to come up with specific examples -- you
show the reorganization, but it isn't clear what principles are being
applied to produce that result. Still, there should be plenty of XSLT
examples out there demonstrating this capability and the principles behind
it. Basically, an XSLT template can specify a mixture of

     What kinds of nodes it will be applied to
     What data gets pulled out of the source document (from the current
node or others)
     What happens to that data (what markup it's combined with to generate
the output)
     Which other nodes should be considered for further processing.

Moving data around is just a matter of adjusting where you look for it and
what you wrap around it.


As to whether to use XSLT or the DOM -- That depends on the details of the
problem, the level at which you want to work with it, who you expect will
be maintaining this in the future. XSLT's a higher-level language, which
means some things are more elegant and some are less so. Driving things via
pattern-matching, as XSLT does, may make your tranformation more robust if
the document's structure changes... or may just mean that it fails
silently. Screw guns make poor hammers, hammers make poor screwdrivers, but
each can do some things better than the other.

______________________________________
Joe Kesselman  / IBM Research



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


Current Thread

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
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.