DOM and xsl

Subject: DOM and xsl
From: pietro abate <pietro.abate@xxxxxx>
Date: Tue, 05 Oct 1999 12:35:09 +0200
Hi,
I've a DTD like 
<!ELEMENT doc (a|b|c|d)+ >
<!ELEMENT c (a|b|d)+ >
....and a,b,d say PCDATA...
I would like to trasform a tree like
<a ></a>              
<b ></b>              
<c>                   
 <a ></a>
 <b ></b>  
 <a ></a> 
</c>
<b></b>
<d></d>

in 
<newtag>
 <b ></b>              
 <a ></a>
 <new C tag 1/>
</newtag>
<newtag>
 <new C tag 2/>
 <a ></a>
 <b ></b>  
 <a ></a>
</newtag>
<newtag>
 <b></b>
 <d></d>
</newtag>
Where new_C_tag_1 and new_C_tag_2 are in relation with <c>.

I've do this in perl with XML::DOM
with a simple recursive program that delay the output of newtag node
until a c node is found.
But I'm not able to do the same in xsl.

Is it only a programmation problem, or a lack of expressivity of xsl
versus DOM ?
TIA,
pietro


 DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist


Current Thread
  • DOM and xsl
    • pietro abate - Tue, 5 Oct 1999 06:37:29 -0400 (EDT) <=