Should I use XSLT or DOM

Subject: Should I use XSLT or DOM
From: Junk Junk <xline1@xxxxxxxxx>
Date: Wed, 14 Jun 2000 13:17:58 -0700 (PDT)
I'm new to XSLT, although I have a fair
understanding of XML, SAX and DOM 
processing. For a new project, I need
to transform one XML document to another.
However, the transformation is not direct.
I need to be able to manipulate the source
tree. 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.

Example: 

Source document:

<?xml version="1.0"?>
<element1  a1="value_1" a2="value_2">
   <element2 a3="value_3"  
         a4="value_4">SomeText</element2>
   <element3>MoreText</element3>
   <element4 a5="value_5"/>
</element1>


Destination document

<?xml version="1.0"?>
<element0>
  <element1 a1="value_5">
    <element2 a2="MoreText"/>
    <element3 a2="value_3">SomeText</element3>
  </element1>
  <element4>
    <element5>value_4</element5>
  </element4>
</element0>

I know the above doesn't make practical 
sense, but it is something like what I need
to do. 

I was wondering if any experienced XML/XSLT
folks might be willing to tell me if XSLT
would be an appropriate tool to use for the
purpose or if I should use DOM parsing
via Java instead?

Thanks much.

Alan V.

__________________________________________________
Do You Yahoo!?
Yahoo! Photos -- now, 100 FREE prints!
http://photos.yahoo.com


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


Current Thread