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

increasing variable?

Subject: increasing variable?
From: "chris poppe" <chris_poppe@xxxxxxxxxxx>
Date: Sat, 06 Dec 2003 13:46:23 +0100
increasing variable
Hello,

Im facing the following problem, here's a piece of my xml doc
<GOP_CONTENT>
    <SUBSTR>
<SUBSTREAM>
<stuff>3216465</stuff>
               <SUBSTREAM_interior>134 464</SUBSTREAM_interior>
              </SUBSTREAM>
              <SUBSTREAM>
                <stuff>64664654</stuff>
<SUBSTREAM_interior>600 1862</SUBSTREAM_interior>
</SUBSTREAM>
      </SUBSTR>
     <MV>
<MV_interior>2462 977</MV_interior>
<MV_end>4294967295</MV_end>
     </MV>
    <SUBSTR>
<SUBSTREAM>
<stuff>1635456</stuff>
<SUBSTREAM_interior>3441 277</SUBSTREAM_interior>
</SUBSTREAM>
     </SUBSTR>

(its an xml doc describing a bitstream) the first element of the interiors (both MV_interior and SUBSTREAM_interior) are positions in the bitstream, the second element is the length (of the MV or SUBSTREAM). As you can see the first substream starts at 134, the second at 600 ( wich is 134 + the length + 2 (stuff) ).

What im trying to do here is to halve ( sorry for my english, I mean divide by 2) the length of the Substreams. Offcourse the positions should be altered too and here comes the problem. I thought i could declare a variable 'position' initiate it at 134 and every time I come across a substream or mv I just add the length but as Ive understood you cant just change your variables?

hope anyone can help me out here, every suggestion is welcome,

this is what the xmldoc should become :

<GOP_CONTENT>
    <SUBSTR>
<SUBSTREAM>
<stuff>3216465</stuff>
               <SUBSTREAM_interior>134 232</SUBSTREAM_interior>
              </SUBSTREAM>
              <SUBSTREAM>
                <stuff>64664654</stuff>
<SUBSTREAM_interior>368 931</SUBSTREAM_interior>
</SUBSTREAM>
      </SUBSTR>
     <MV>
<MV_interior>1299 977</MV_interior>
<MV_end>4294967295</MV_end>
     </MV>
    <SUBSTR>
<SUBSTREAM>
<stuff>1635456</stuff>
<SUBSTREAM_interior>1276 277</SUBSTREAM_interior>
</SUBSTREAM>
     </SUBSTR>

greetings Chris

_________________________________________________________________



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.