[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
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.
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:
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
And then i use another xsl transformation to change the size.
I would love to see all this happen in one xsl transformation,
_________________________________________________________________
Ben jij klaar voor De Vuilbek? http://devuilbek.msn.be/start.php Nu op JIM en MSN
[xsl] xsl problem
Subject: [xsl] xsl problem From: "poppe chris" <pc_poppe@xxxxxxxxxxx> Date: Tue, 30 Mar 2004 16:35:16 +0200 |
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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: AW: AW: AW: [xsl] change a attr, Markus Hanel | Thread | RE: [xsl] xsl problem, Andreas L. Delmelle |
Re: [xsl] how to <xsl:apply-templat, James A. Robinson | Date | [xsl] template matching, passing pa, poppe chris |
Month |