[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] xsl problem
Hello, Im facing the following problem,
I have a xml file like this, in wich an A element contains an offset (20, 30, 40) and a length (5, 10, 5) and the size element in the header is the sum of the lengths. <header> <size>20</size> </header> <GOP> <content> <A>20 5</A> <B/> <A>30 10</A> <A>40 5</A> <B/> </content> </GOP> What i want to do is match any A element and alter the length for example everywhere + 3 except for lenghts greater then or equal to 10. But the problem is that I then have to change the size. So the outputxml file should be: <header> <size>26</size> </header> <GOP> <content> <A>20 8</A> <B/> <A>30 10</A> <A>40 8</A> <B/> </content> </GOP> I dont have a problem changing the A elements but i do have a problem in changing the size to the right number. Currently im using 2 xsl files to solve this, one to change the A elements and put the changed length in an helper element, this produces the following xml file <header> <size>20</size> </header> <GOP> <content> <A>20 8</A> <help>8</help> <B/> <A>30 10</A> <help>10</help> <A>40 8</A> <help>8</help> <B/> </content> </GOP> And then i use another xsl transformation to change the size. I would love to see all this happen in one xsl transformation, anyone got any idea's? greetings, Chris _________________________________________________________________ Ben jij klaar voor De Vuilbek? http://devuilbek.msn.be/start.php Nu op JIM en MSN
|
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
|