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

(re-)calculating attribute values

Subject: (re-)calculating attribute values
From: "Christian Timmerer" <christian.timmerer@xxxxxxxxxxxxxxxxxx>
Date: Mon, 11 Mar 2002 21:42:12 +0100
xslt calculate balance
hello *.*,
  following xml-file:

<A start="20" end="28">Text1</A>
<B start="29" end="35">Text2</B>
<C start="36" end="39">Text3</C>
<C start="40" end="44">Text4</C>
<A start="45" end="51">Text5</A>
<C start="52" end="58">Text6</C>
<B start="59" end="69">Text7</B>
...

i want to write a xslt file which removes all <C> elements (no problem) and
recalculates start and end values by filling up the gaps. and here i have
the problem: in the first case it is possible to fill up the gab between the
first <B> and second <A>:

1: <A start="20" end="28">Text1</A>
2: <B start="29" end="35">Text2</B>
3: <!-- removed <C> element(s) -->
4: <A start="36" end="42">Text5</A>
5: <!-- removed <C> element(s) -->
6: <B start="52" end="62">Text7</B>   (problem!!!)

The problem arises at the second gap (line 6). the gap is calculated by
using end value of second <A> and start value of last <B> (59-51=8) and not
by using already recalculated values in previous step (59-42=17).

what's going wrong here? has anyone a hint or maybe a solution for me?

any help would be appreciated!

regards
  christian


 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.